feat(firebase): integrate Firebase + APNs/FCM push notifications
Phase 2 of multi-environment setup. Adds Firebase core, Crashlytics, Analytics, Remote Config, Performance, Messaging and flutter_local_notifications, plus full APNs configuration for iOS push. - Wire setupFirebase(env) and setupNotifications() in initApp - Add firebase_options for dev and staging via flutterfire (sf-platform-pre) - Register google-services / firebase-perf / crashlytics gradle plugins - Add per-flavor GoogleService-Info.plist with Build Phase script that copies the right plist into the .app bundle based on \$CONFIGURATION - Bump iOS deployment target 13.0 -> 15.0 (required by firebase_analytics) - Pin flutter_local_notifications to ^19.4.2 (v20+ needs Dart SDK >=3.10) - Add aps-environment to staging (development) and production entitlements; development flavor intentionally excluded (no App Store Connect entry) - Fix AppDelegate.swift to call super.application after forwarding to AntelopAppDelegate, otherwise Firebase Messaging swizzling breaks and the APNs token is never captured - Crashlytics reports in all builds (debug + release) for early detection - Tag analytics events with env user property per flavor - App Check intentionally not included (debug-token friction with large QA team); can be re-added release-only later
This commit is contained in:
@@ -3,6 +3,11 @@ import java.io.FileInputStream
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
// START: FlutterFire Configuration
|
||||
id("com.google.gms.google-services")
|
||||
id("com.google.firebase.firebase-perf")
|
||||
id("com.google.firebase.crashlytics")
|
||||
// END: FlutterFire Configuration
|
||||
id("kotlin-android")
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
|
||||
48
apps/mobile_app/android/app/google-services.json
Normal file
48
apps/mobile_app/android/app/google-services.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "535646668726",
|
||||
"project_id": "sf-platform-pre",
|
||||
"storage_bucket": "sf-platform-pre.firebasestorage.app"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:535646668726:android:c3a09d6c26f0cdf95e6317",
|
||||
"android_client_info": {
|
||||
"package_name": "com.savefamily.app.dev"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAzo8E_L6iUYWmK1BDFpNqRri1df6CqJiY"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:535646668726:android:b87245b807258e3e5e6317",
|
||||
"android_client_info": {
|
||||
"package_name": "com.savefamily.app.stag"
|
||||
}
|
||||
},
|
||||
"oauth_client": [],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAzo8E_L6iUYWmK1BDFpNqRri1df6CqJiY"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": []
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
Reference in New Issue
Block a user