- productFlavors - for Android
- additional scheme - iOS
- react-native-config - for setting up config via ENV
- Please - use only "dev" scheme/productFlavor for development! "stage"/"production" are going to be used while QA/Production
- On iOS platform only "dev" scheme is debuggable, "stage"/"production" are signed via release configs
- No pure
react-native run-android
usage. For development - please use commands below; - No pure
cd android && ./gradlew assembleRelease
usage. For development - please use commands below;
react-native run-android --variant=devDebug
- dev version (uses config from .env.dev);react-native run-android --variant=stageDebug
- stage version (uses config from .env.stage);react-native run-android --variant=productionDebug
- production version (uses config from .env.production);
Starting: Intent { cmp=com.app/.MainActivity } Error type 3 Error: Activity class {com.app/com.app.MainActivity} does not exist.
cd android && ./gradlew assembleDev
- dev version (uses config from .env.dev);cd android && ./gradlew assembleStage
- stage version (uses config from .env.stage);cd android && ./gradlew assembleProduction
- production version (uses config from .env.production);
- No pure
react-native run-ios
usage. For development - please use Xcode;
react-native-config
- basic link changes (MainApplication.java, settings.gradle, android/app/build.gradle);android/app/build.gradle
- all changes are marked;proguard-rules.pro
- all changes are marked;- added
app/src/dev/res/values/strings.xml
for "dev" productFlavor - for bundle nameDEV-app
; - added
app/src/stage/res/values/strings.xml
for "stage" productFlavor - for bundle nameSTAGING-app
; - added
app/src/production/res/values/strings.xml
for "production" productFlavor - for bundle nameapp
;
-
react-native-config
- basic link changes (Libraries, Build Setting, Linked Frameworks and Libraries, Build Phases); -
Added new configuration (Staging)
- Added new User-Defined Settings (APP_BUNDLE_ID_SUFFIX, APP_ENVIRONMENT, APP_PRODUCT_NAME)
- Updated Product Bundle Identifier for each configuration (Debug, Staging, Release)
- Added Library Search Paths fix for new configuration (Staging)
- Added Per-configuration build products path fix for new configuration (for "App Target" on tab "Build Settings") (Staging)
- Updated Product Name (Added Prefix)
- Duplicated "production" scheme - called "stage" scheme
- Edited ALL schemes ("dev", "stage", "production"); For each scheme - setting up
Pre-actions
- Set up Pre-action script for ALL schemes (Build, Run, Archive):
- "dev" - ".env.dev"
- "stage" - ".env.stage"
- "production" - ".env.production"
- Set up Build Configuration script for ALL schemes (Run, Archive):
- "dev" - "Debug"
- "stage" - "Staging"
- "production" - "Release"