Skip to content

Commit b198d70

Browse files
authored
Update App Preview info (#3128)
* update app preview info * merge Flutter flavors example with Flutter vanilla example
1 parent 46d4107 commit b198d70

2 files changed

Lines changed: 29 additions & 70 deletions

File tree

content/flutter-testing/app-preview.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ aliases:
77

88
Stellar is our iOS simulator and Android emulator running in your browser. Launch and interact with your iOS or Android app right in the browser, regardless of the operating system you are using. Test your app against different device and OS configurations, emulate GPS location or demo the latest app version without needing access to a physical device.
99

10+
{{< youtube vb_pSHy9PG0 >}}
11+
1012
**Tip:** The following sections describe creating previewable artifacts using Flutter Workflow Editor. If you're using codemagic.yaml, follow the instructions [here](../yaml-testing/app-preview).
1113

12-
## Enabling App Preview
14+
## Enabling App Preview and Free Trial
1315

1416
{{<notebox>}}
1517
This feature is available for **teams** only.
1618
{{</notebox>}}
1719

18-
Teams on the Pay as you go plan can enable the feature via the **App Preview** page in left sidebar.
20+
Teams on the **Pay as you go** plan can enable the feature via the **App Preview** page on the left sidebar and will get 100 free trial minutes. Once used up, further app preview minutes will be billed at the rate of 0.095/min and included in your monthly invoice.
1921

20-
Teams on annual plans can request access to App Preview by [contacting us](https://codemagic.io/contact/).
22+
Teams on annual plans can try out App Preview by [contacting us](https://codemagic.io/contact/).
2123

2224
## Creating iOS .app binaries for previewing on the simulator
2325

content/yaml-testing/app-preview.md

Lines changed: 24 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -7,108 +7,65 @@ aliases:
77

88
Stellar is our iOS simulator and Android emulator running in your browser. Launch and interact with your iOS or Android app right in the browser, regardless of the operating system you are using. Test your app against different device and OS configurations, emulate GPS location or demo the latest app version without needing access to a physical device.
99

10+
{{< youtube vb_pSHy9PG0 >}}
11+
1012
**Tip:** The following sections describe creating previewable artifacts using codemagic.yaml. If you're using the Flutter Workflow Editor, follow the instructions [here](../flutter-testing/app-preview).
1113

12-
## Enabling App Preview
14+
## Enabling App Preview and Free Trial
1315

1416
{{<notebox>}}
1517
This feature is available for **teams** only.
1618
{{</notebox>}}
1719

18-
Teams on the Pay as you go plan can enable the feature via the **App Preview** page in left sidebar.
19-
20-
Teams on annual plans can request access to App Preview by [contacting us](https://codemagic.io/contact/).
20+
Teams on the **Pay as you go** plan can enable the feature via the **App Preview** page on the left sidebar and will get 100 free trial minutes. Once used up, further app preview minutes will be billed at the rate of 0.095/min and included in your monthly invoice.
2121

22+
Teams on annual plans can try out App Preview by [contacting us](https://codemagic.io/contact/).
2223

2324
## Creating iOS .app binaries for previewing on the simulator
2425

2526
To create a `.app` to run on the iOS simulator, consult the **codemagic.yaml** samples below.
2627

27-
You should make sure that the following values in the `-destination` string correspond with the macOS instance you are using:
28-
29-
- `name` corresponds with one of the devices available on the macOS instance being used.
30-
- `OS` matches the iOS runtime available on the macOS instance being used.
31-
32-
You can find the macOS specifications that list the available iOS devices and runtimes [here](../specs/versions-macos).
33-
3428
{{< tabpane >}}
35-
{{< tab header="Flutter" >}}
29+
30+
{{< tab header="iOS" >}}
3631
{{<markdown>}}
37-
Sample **codemagic.yaml** for building an iOS `.app` binary for Flutter projects.
32+
Sample **codemagic.yaml** for building an iOS `.app` binary using Xcode build commands.
3833

3934
{{< highlight yaml "style=paraiso-dark">}}
4035
workflows:
41-
flutter-ios-simulator:
42-
name: Flutter iOS Simulator
36+
simulator-workflow:
37+
name: Build for simulator
4338
environment:
44-
flutter: 3.27.3
45-
xcode: 16.2
39+
xcode: latest
4640
scripts:
47-
- name: install dependencies
48-
script: flutter pub get
49-
- name: Build unsigned .app
50-
script: |
51-
xcodebuild -workspace "ios/Runner.xcworkspace" \
52-
-scheme "Runner" \
41+
- name: Build with Generic Destination
42+
script: |
43+
xcodebuild build \
44+
-project "yourproject.xcodeproj" \
45+
-scheme "yourscheme" \
5346
-sdk iphonesimulator \
54-
-destination 'platform=iOS Simulator,name=iPhone 16,OS=18.2' \
55-
-configuration Debug \
56-
CODE_SIGN_IDENTITY="" \
57-
CODE_SIGNING_REQUIRED=NO \
58-
CODE_SIGNING_ALLOWED=NO \
59-
-derivedDataPath ios/output
60-
artifacts:
61-
- ios/output/Build/Products/Debug-iphonesimulator/Runner.app
62-
{{< /highlight >}}
63-
64-
Alternatively, you can target any available simulator on the build machine by using the Flutter build command with the `--simulator` flag.
65-
66-
{{< highlight yaml "style=paraiso-dark">}}
67-
scripts:
68-
- name: Run Flutter pub get
69-
script: flutter pub get
70-
- name: Build unsigned .app for simulator
71-
script: flutter build ios --simulator
47+
-configuration Debug
7248
artifacts:
73-
- build/ios/iphonesimulator/Runner.app
49+
- /Users/builder/Library/Developer/Xcode/DerivedData/**/*.app
7450
{{< /highlight >}}
75-
76-
7751
{{</markdown>}}
7852
{{< /tab >}}
7953

80-
81-
{{< tab header="Flutter (Flavors)" >}}
54+
{{< tab header="Flutter" >}}
8255
{{<markdown>}}
83-
84-
If you are using Flutter flavors and want to preview a specific flavor, make sure that you set the correct value for your flavor's `-scheme` and set the entry point for your flavor using `FLUTTER_TARGET`.
56+
Sample **codemagic.yaml** for building an iOS `.app` binary for Flutter projects.
8557

8658
{{< highlight yaml "style=paraiso-dark">}}
8759
workflows:
88-
flutter-flavor-ios-simulator:
89-
name: Flutter Flavor iOS Simulator
60+
flutter-ios-simulator:
61+
name: Flutter iOS Simulator
9062
environment:
9163
flutter: 3.27.3
9264
xcode: 16.2
93-
cocoapods: default
9465
scripts:
95-
- name: install dependencies
96-
script: flutter pub get
97-
- name: Build unsigned .app
98-
script: |
99-
xcodebuild -workspace "ios/Runner.xcworkspace" \
100-
-scheme "Runner-dev" \
101-
-sdk iphonesimulator \
102-
-destination "platform=iOS Simulator,name=iPhone 16,OS=18.2" \
103-
-configuration Debug \
104-
CODE_SIGN_IDENTITY="" \
105-
CODE_SIGNING_REQUIRED=NO \
106-
CODE_SIGNING_ALLOWED=NO \
107-
FLUTTER_TARGET=lib/main_dev.dart \
108-
FLUTTER_BUILD_MODE=debug \
109-
-derivedDataPath ios/output
66+
- flutter build ios --simulator --flavor staging # --flavor is optional
11067
artifacts:
111-
- ios/output/Build/Products/Debug-iphonesimulator/Runner.app
68+
- build/ios/iphonesimulator/Runner.app
11269
{{< /highlight >}}
11370
{{</markdown>}}
11471
{{< /tab >}}

0 commit comments

Comments
 (0)