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
69 lines
2.3 KiB
Dart
69 lines
2.3 KiB
Dart
// File generated by FlutterFire CLI.
|
|
// ignore_for_file: type=lint
|
|
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
|
|
import 'package:flutter/foundation.dart'
|
|
show defaultTargetPlatform, kIsWeb, TargetPlatform;
|
|
|
|
/// Default [FirebaseOptions] for use with your Firebase apps.
|
|
///
|
|
/// Example:
|
|
/// ```dart
|
|
/// import 'firebase_options_dev.dart';
|
|
/// // ...
|
|
/// await Firebase.initializeApp(
|
|
/// options: DefaultFirebaseOptions.currentPlatform,
|
|
/// );
|
|
/// ```
|
|
class DefaultFirebaseOptions {
|
|
static FirebaseOptions get currentPlatform {
|
|
if (kIsWeb) {
|
|
throw UnsupportedError(
|
|
'DefaultFirebaseOptions have not been configured for web - '
|
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
|
);
|
|
}
|
|
switch (defaultTargetPlatform) {
|
|
case TargetPlatform.android:
|
|
return android;
|
|
case TargetPlatform.iOS:
|
|
return ios;
|
|
case TargetPlatform.macOS:
|
|
throw UnsupportedError(
|
|
'DefaultFirebaseOptions have not been configured for macos - '
|
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
|
);
|
|
case TargetPlatform.windows:
|
|
throw UnsupportedError(
|
|
'DefaultFirebaseOptions have not been configured for windows - '
|
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
|
);
|
|
case TargetPlatform.linux:
|
|
throw UnsupportedError(
|
|
'DefaultFirebaseOptions have not been configured for linux - '
|
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
|
);
|
|
default:
|
|
throw UnsupportedError(
|
|
'DefaultFirebaseOptions are not supported for this platform.',
|
|
);
|
|
}
|
|
}
|
|
|
|
static const FirebaseOptions android = FirebaseOptions(
|
|
apiKey: 'AIzaSyAzo8E_L6iUYWmK1BDFpNqRri1df6CqJiY',
|
|
appId: '1:535646668726:android:c3a09d6c26f0cdf95e6317',
|
|
messagingSenderId: '535646668726',
|
|
projectId: 'sf-platform-pre',
|
|
storageBucket: 'sf-platform-pre.firebasestorage.app',
|
|
);
|
|
|
|
static const FirebaseOptions ios = FirebaseOptions(
|
|
apiKey: 'AIzaSyBeijehJIznndwIUlbMkj6reYT4z-WHGfQ',
|
|
appId: '1:535646668726:ios:524afa641f61d7cb5e6317',
|
|
messagingSenderId: '535646668726',
|
|
projectId: 'sf-platform-pre',
|
|
storageBucket: 'sf-platform-pre.firebasestorage.app',
|
|
iosBundleId: 'com.savefamily.app.dev',
|
|
);
|
|
}
|