Config Build Flavor on IOS
Create a build flavor with the name: Nightly
Last updated
Create a build flavor with the name: Nightly
Last updated
Click on the Runner, click the + button, choose duplicate "Debug Configuration", and change the name to "Debug-Nightly".
Create New Scheme, named "Nightly" with "target Runner". After that edit scheme with "Build Configuration" in "run, test, analyze" to "Debug-Nightly".
Change "Product bundle identifier" and "Product name" for every flavor.
With another variable like the "Google map API" key. Define a variable in user-defined, and change the value for each flavor
an example is add GoogleService-Info.plist
Copy to project file like this:
Select target Runner, and tab Build Phases, click + button, edit the name of the script to what you want.
This script means copying the file to the right path when we build with a flavor.
Change FLUTTER_TARGET in User-Defined for each environment.
staging: lib/main_stg.dart nightly: lib/main_nightly.dart production: lib/main_production.dart
That's all you need to do.