File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -30,17 +30,19 @@ - (BOOL)application:(UIApplication *)application customDidFinishLaunchingWithOpt
3030 [self application: application customDidFinishLaunchingWithOptions: launchOptions];
3131
3232 NSLog (@" DidFinishLaunchingWithOptions" );
33-
34- if ([FIRApp defaultApp ] == nil ) {
35- [self performSelector: @selector (registerForNotifications ) withObject: self afterDelay: 0 .3f ];
36- }
33+ [self performSelector: @selector (registerForNotifications ) withObject: self afterDelay: 0 .3f ];
3734
3835 return YES ;
3936}
4037
4138- (void ) registerForNotifications {
39+ // [BEGIN configure_firebase]
40+ if ([FIRApp defaultApp ] == nil ) {
41+ [FIRApp configure ];
42+ }
43+ // [END configure_firebase]
44+
4245 // [BEGIN register_for_notifications]
43- [FIRApp configure ];
4446 UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge ;
4547 [[UNUserNotificationCenter currentNotificationCenter ] requestAuthorizationWithOptions: authOptions completionHandler: ^(BOOL granted, NSError * _Nullable error) {
4648 if (granted) {
@@ -51,7 +53,6 @@ - (void) registerForNotifications {
5153 NSLog (@" User Notification permission denied: %@ " , error.localizedDescription );
5254 }
5355 }];
54-
5556 // For iOS 10 display notification (sent via APNS)
5657 [UNUserNotificationCenter currentNotificationCenter ].delegate = self;
5758 // For iOS 10 data message (sent via FCM)
You can’t perform that action at this time.
0 commit comments