@@ -2,42 +2,34 @@ import UIKit
22import React
33import React_RCTAppDelegate
44import ReactAppDependencyProvider
5- import FirebaseCore
6- import FirebaseMessaging
75
86@main
97class AppDelegate : UIResponder , UIApplicationDelegate {
108 var window : UIWindow ?
11-
9+
1210 var reactNativeDelegate : ReactNativeDelegate ?
1311 var reactNativeFactory : RCTReactNativeFactory ?
14-
12+
1513 func application(
16- _ application: UIApplication ,
17- didFinishLaunchingWithOptions launchOptions: [ UIApplication . LaunchOptionsKey : Any ] ? = nil
18- ) -> Bool {
19- let delegate = ReactNativeDelegate ( )
20- let factory = RCTReactNativeFactory ( delegate: delegate)
21- delegate. dependencyProvider = RCTAppDependencyProvider ( )
22- FirebaseApp . configure ( )
23-
24- reactNativeDelegate = delegate
25- reactNativeFactory = factory
26-
27- window = UIWindow ( frame: UIScreen . main. bounds)
28-
29- factory. startReactNative (
30- withModuleName: " SampleApp " ,
31- in: window,
32- launchOptions: launchOptions
33- )
34-
35- return true
36- }
37-
38- func application( _ application: UIApplication , didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data ) {
39- // Pass the device token to FCM
40- Messaging . messaging ( ) . apnsToken = deviceToken
14+ _ application: UIApplication ,
15+ didFinishLaunchingWithOptions launchOptions: [ UIApplication . LaunchOptionsKey : Any ] ? = nil
16+ ) -> Bool {
17+ let delegate = ReactNativeDelegate ( )
18+ let factory = RCTReactNativeFactory ( delegate: delegate)
19+ delegate. dependencyProvider = RCTAppDependencyProvider ( )
20+
21+ reactNativeDelegate = delegate
22+ reactNativeFactory = factory
23+
24+ window = UIWindow ( frame: UIScreen . main. bounds)
25+
26+ factory. startReactNative (
27+ withModuleName: " SampleApp " ,
28+ in: window,
29+ launchOptions: launchOptions
30+ )
31+
32+ return true
4133 }
4234}
4335
0 commit comments