feat(build): add dev/staging/prod flavors for client_app + mitra_app
Android product flavors (.dev/.staging suffixes, prod clean) + per-flavor
Dart entrypoints, dart-define env files, and per-flavor Firebase config for
both platforms across 3 projects (halobestie-clone-dev / my-bestie-876ec /
my-bestie-production).
- Android: flavorDimensions("env") + productFlavors; @string/app_name label;
per-flavor src/<flavor>/google-services.json (clients verified to match each
applicationId).
- iOS: customer app re-based to the EXISTING App Store identity
com.asc.hallobestie (dev/staging suffix it; ships as an update to the live
app). mitra is a new app (com.mybestie.mitra). Per-flavor plists staged in
ios/config/<flavor>/; Xcode scheme wiring deferred (Mac follow-up).
- firebase_options_{dev,staging,prod}.dart filled with real android + iOS
values (regenerated from the native config files).
- BUILD_FLAVORS.md per app documents flavor table, build commands, iOS
identity decision, and the remaining iOS Xcode steps.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -496,7 +496,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mybestie;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.asc.hallobestie;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
@@ -513,7 +513,7 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mybestie.RunnerTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.asc.hallobestie.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
@@ -531,7 +531,7 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mybestie.RunnerTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.asc.hallobestie.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
@@ -547,7 +547,7 @@
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mybestie.RunnerTests;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.asc.hallobestie.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
@@ -679,7 +679,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mybestie;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.asc.hallobestie;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
@@ -702,7 +702,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mybestie;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.asc.hallobestie;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>com.mybestie</string>
|
||||
<string>com.asc.hallobestie</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>halobestie</string>
|
||||
|
||||
34
client_app/ios/config/README.md
Normal file
34
client_app/ios/config/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# iOS per-flavor Firebase config — client_app
|
||||
|
||||
iOS has **no** automatic per-flavor resolution (unlike Android's
|
||||
`android/app/src/<flavor>/google-services.json`). Stage the three
|
||||
`GoogleService-Info.plist` files here, one per flavor:
|
||||
|
||||
```
|
||||
ios/config/
|
||||
dev/GoogleService-Info.plist → bundle com.asc.hallobestie.dev (dev project)
|
||||
staging/GoogleService-Info.plist → bundle com.asc.hallobestie.staging (staging/nonprod)
|
||||
prod/GoogleService-Info.plist → bundle com.asc.hallobestie (prod project, live App Store app)
|
||||
```
|
||||
|
||||
> The customer iOS bundle base is **`com.asc.hallobestie`** (the existing App
|
||||
> Store app), NOT the Android `com.mybestie`. See `../../BUILD_FLAVORS.md`.
|
||||
|
||||
## Wiring (Xcode — Mac follow-up, not done yet)
|
||||
|
||||
The active plist Xcode bundles is `ios/Runner/GoogleService-Info.plist`. To make
|
||||
it per-flavor, add a **Run Script** build phase to the Runner target, placed
|
||||
**before** "Compile Sources":
|
||||
|
||||
```bash
|
||||
cp "${PROJECT_DIR}/config/${FLAVOR}/GoogleService-Info.plist" \
|
||||
"${PROJECT_DIR}/Runner/GoogleService-Info.plist"
|
||||
```
|
||||
|
||||
`${FLAVOR}` is a per-scheme/configuration build setting you define when creating
|
||||
the dev/staging/prod schemes (e.g. `FLAVOR = dev` in the dev configuration).
|
||||
|
||||
### Single-env shortcut
|
||||
If you only need one env working (e.g. dev) before the full scheme setup, just
|
||||
drop that env's plist directly at `ios/Runner/GoogleService-Info.plist` — no
|
||||
script needed for a single environment.
|
||||
30
client_app/ios/config/dev/GoogleService-Info.plist
Executable file
30
client_app/ios/config/dev/GoogleService-Info.plist
Executable file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyAQnB5hbj0T5tE4JQZQ9Tx6Whp_u15obMI</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>1068156046511</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>com.asc.hallobestie.dev</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>halobestie-clone-dev</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>halobestie-clone-dev.firebasestorage.app</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true></true>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:1068156046511:ios:bc9098ffc2c2913ab8185a</string>
|
||||
</dict>
|
||||
</plist>
|
||||
15
client_app/ios/config/dev/GoogleService-Info.plist.README
Normal file
15
client_app/ios/config/dev/GoogleService-Info.plist.README
Normal file
@@ -0,0 +1,15 @@
|
||||
Place the DEV GoogleService-Info.plist here, named exactly:
|
||||
|
||||
GoogleService-Info.plist
|
||||
|
||||
Register this iOS app first:
|
||||
• Firebase project: halobestie-clone-dev (the DEV project)
|
||||
• iOS bundle ID: com.asc.hallobestie.dev
|
||||
Then download its GoogleService-Info.plist into this folder (delete this .README).
|
||||
|
||||
Also paste its appId/apiKey into lib/firebase/firebase_options_dev.dart
|
||||
(the iOS section currently holds PLACEHOLDER values).
|
||||
|
||||
How it gets used: a build-phase "Run Script" (added in Xcode — Mac follow-up)
|
||||
copies the per-flavor file into ios/Runner/GoogleService-Info.plist at build
|
||||
time. See ../README.md and BUILD_FLAVORS.md.
|
||||
36
client_app/ios/config/prod/GoogleService-Info.plist
Executable file
36
client_app/ios/config/prod/GoogleService-Info.plist
Executable file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CLIENT_ID</key>
|
||||
<string>953866659887-bsb3c2a6ir10u47q8vcacre2tmnk59jb.apps.googleusercontent.com</string>
|
||||
<key>REVERSED_CLIENT_ID</key>
|
||||
<string>com.googleusercontent.apps.953866659887-bsb3c2a6ir10u47q8vcacre2tmnk59jb</string>
|
||||
<key>ANDROID_CLIENT_ID</key>
|
||||
<string>953866659887-5a62u0tdce92i0gmfo0gf3dt0dnlre42.apps.googleusercontent.com</string>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyA8guPSD87eDLeCsH6jVd1n2_SI4_MaGNE</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>953866659887</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>com.asc.hallobestie</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>my-bestie-production</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>my-bestie-production.firebasestorage.app</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true></true>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:953866659887:ios:159fd11b1d2f3633183eda</string>
|
||||
</dict>
|
||||
</plist>
|
||||
16
client_app/ios/config/prod/GoogleService-Info.plist.README
Normal file
16
client_app/ios/config/prod/GoogleService-Info.plist.README
Normal file
@@ -0,0 +1,16 @@
|
||||
Place the PROD GoogleService-Info.plist here, named exactly:
|
||||
|
||||
GoogleService-Info.plist
|
||||
|
||||
Register this iOS app first:
|
||||
• Firebase project: the PRODUCTION project
|
||||
• iOS bundle ID: com.asc.hallobestie (the EXISTING App Store app — v2 ships
|
||||
as an update to it; needs the `asc` Apple Developer account)
|
||||
Then download its GoogleService-Info.plist into this folder (delete this .README).
|
||||
|
||||
Also paste its values into lib/firebase/firebase_options_prod.dart
|
||||
(currently all PLACEHOLDER).
|
||||
|
||||
How it gets used: a build-phase "Run Script" (added in Xcode — Mac follow-up)
|
||||
copies the per-flavor file into ios/Runner/GoogleService-Info.plist at build
|
||||
time. See ../README.md and BUILD_FLAVORS.md.
|
||||
36
client_app/ios/config/staging/GoogleService-Info.plist
Executable file
36
client_app/ios/config/staging/GoogleService-Info.plist
Executable file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CLIENT_ID</key>
|
||||
<string>650461407929-fb4t48nmguaslfvis7ebsea8vndro7ac.apps.googleusercontent.com</string>
|
||||
<key>REVERSED_CLIENT_ID</key>
|
||||
<string>com.googleusercontent.apps.650461407929-fb4t48nmguaslfvis7ebsea8vndro7ac</string>
|
||||
<key>ANDROID_CLIENT_ID</key>
|
||||
<string>650461407929-3els6l9cegtiphe930vtjr80ffa2p1uv.apps.googleusercontent.com</string>
|
||||
<key>API_KEY</key>
|
||||
<string>AIzaSyC_BewS88iaNsc9QdwsPzkV0sf9wUs4i_4</string>
|
||||
<key>GCM_SENDER_ID</key>
|
||||
<string>650461407929</string>
|
||||
<key>PLIST_VERSION</key>
|
||||
<string>1</string>
|
||||
<key>BUNDLE_ID</key>
|
||||
<string>com.asc.hallobestie.staging</string>
|
||||
<key>PROJECT_ID</key>
|
||||
<string>my-bestie-876ec</string>
|
||||
<key>STORAGE_BUCKET</key>
|
||||
<string>my-bestie-876ec.firebasestorage.app</string>
|
||||
<key>IS_ADS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_ANALYTICS_ENABLED</key>
|
||||
<false></false>
|
||||
<key>IS_APPINVITE_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_GCM_ENABLED</key>
|
||||
<true></true>
|
||||
<key>IS_SIGNIN_ENABLED</key>
|
||||
<true></true>
|
||||
<key>GOOGLE_APP_ID</key>
|
||||
<string>1:650461407929:ios:4ee79d479b69d688504968</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,15 @@
|
||||
Place the STAGING GoogleService-Info.plist here, named exactly:
|
||||
|
||||
GoogleService-Info.plist
|
||||
|
||||
Register this iOS app first:
|
||||
• Firebase project: the STAGING / nonprod project
|
||||
• iOS bundle ID: com.asc.hallobestie.staging
|
||||
Then download its GoogleService-Info.plist into this folder (delete this .README).
|
||||
|
||||
Also paste its values into lib/firebase/firebase_options_staging.dart
|
||||
(currently all PLACEHOLDER).
|
||||
|
||||
How it gets used: a build-phase "Run Script" (added in Xcode — Mac follow-up)
|
||||
copies the per-flavor file into ios/Runner/GoogleService-Info.plist at build
|
||||
time. See ../README.md and BUILD_FLAVORS.md.
|
||||
Reference in New Issue
Block a user