Setting launch.json in VSCode
1. Download launch.json and save to .vscode/launch.json
2. change environment that you want to use in line 13, for example you can change to nonprod
or stage
3. change local config (optional, it will override by remote config)
change env.dart
to environtment that you want, it available on app/scripts/tools/env
Setting Environment in Ios/Apple
1. Goto Fastfile and comment on line 66 to 99, and run fastlane stage
or fastlane dev
on ios folder (app_safi/ios) to change info.plist (don't commit this changes)
2. copy and rename GoogleService-info-{env}.plist
from app/scripts/tools/ios
to app/app_safi/ios/Runner/GoogleService-info.plist
3. activate flutterfire and run this command on app_safi
module, you can change stage
to environment that you want, for example nonprod
or stage
. this is for stage
:
flutterfire configure -y --platforms="ios" -m ph.safibank.app.stage -p "safi-env-stage-apps" -a ph.safibank.app.stage -i ph.safibank.app.stage
4. run the app.
Setting Environment in Android
1. run this command on safi_app
, then run the app by pressing F5 (don't forget to change environment in launch.json)
:
flutterfire configure -y --platforms="android" -m ph.safibank.app.stage -p "safi-env-stage-apps" -a ph.safibank.app.stage -i ph.safibank.app.stage
* note : if you use flutter run
to run app in the terminal, you need to export the environment
by run this command export environment=stage
Attachments:
Screen Shot 2022-09-08 at 08.52.34.png (image/png)
Screen Shot 2022-09-08 at 09.04.36.png (image/png)