Browse Source

iOS云消息Firebase在AppDelegate中新增FirebaseApp.configure()代码

jiangwei 1 week ago
parent
commit
e760cab5d6

+ 0 - 8
app/ios/Runner.xcodeproj/project.pbxproj

@@ -275,14 +275,10 @@
 			inputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
 			);
-			inputPaths = (
-			);
 			name = "[CP] Copy Pods Resources";
 			outputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
 			);
-			outputPaths = (
-			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
 			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
@@ -296,14 +292,10 @@
 			inputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
 			);
-			inputPaths = (
-			);
 			name = "[CP] Embed Pods Frameworks";
 			outputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
 			);
-			outputPaths = (
-			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
 			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";

+ 2 - 1
app/ios/Runner/AppDelegate.swift

@@ -2,7 +2,7 @@ import UIKit
 import AppTrackingTransparency
 import Flutter
 import AuthenticationServices
-
+import Firebase
 @main
 @objc class AppDelegate: FlutterAppDelegate {
     
@@ -14,6 +14,7 @@ import AuthenticationServices
     _ application: UIApplication,
     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
   ) -> Bool {
+      FirebaseApp.configure()
       GeneratedPluginRegistrant.register(with: self)
       self.initPlatformMethods()
     return super.application(application, didFinishLaunchingWithOptions: launchOptions)

+ 6 - 12
app/lib/firebase_options.dart

@@ -41,18 +41,12 @@ class MyFirebaseOptions {
   );
 
   static const FirebaseOptions ios = FirebaseOptions(
-    apiKey: 'AIzaSyDooSUGSf63Ghq02_iIhtnmwMDs4HlWS6c',
-    appId: '1:406099696497:ios:acd9c8e17b5e620e3574d0',
-    messagingSenderId: '406099696497',
-    projectId: 'flutterfire-e2e-tests',
-    databaseURL:
-        'https://flutterfire-e2e-tests-default-rtdb.europe-west1.firebasedatabase.app',
-    storageBucket: 'flutterfire-e2e-tests.appspot.com',
-    androidClientId:
-        '406099696497-tvtvuiqogct1gs1s6lh114jeps7hpjm5.apps.googleusercontent.com',
-    iosClientId:
-        '406099696497-taeapvle10rf355ljcvq5dt134mkghmp.apps.googleusercontent.com',
-    iosBundleId: 'io.flutter.plugins.firebase.tests',
+    apiKey: 'AIzaSyB0js4be6MN7iB8FbQ6pu03Hjw4TPkYBgE',
+    appId: '1:826534850691:ios:16c725bf24a7d1e9262bb6',
+    messagingSenderId: '826534850691',
+    projectId: 'ifm-21739',
+    storageBucket: 'ifm-21739.firebasestorage.app',
+    iosBundleId: 'com.hongyegroup.app24ifm',
   );
 
 }