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:
34
mitra_app/ios/config/README.md
Normal file
34
mitra_app/ios/config/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# iOS per-flavor Firebase config — mitra_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.mybestie.mitra.dev (dev project)
|
||||
staging/GoogleService-Info.plist → bundle com.mybestie.mitra.staging (staging/nonprod)
|
||||
prod/GoogleService-Info.plist → bundle com.mybestie.mitra (prod project)
|
||||
```
|
||||
|
||||
> The mitra app is a **brand-new app** on both platforms — no legacy App Store
|
||||
> identity (unlike the customer app, which inherits `com.asc.hallobestie`).
|
||||
|
||||
## 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.
|
||||
Reference in New Issue
Block a user