File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -484,7 +484,7 @@ - (void)setAutoInitEnabled:(BOOL)autoInitEnabled {
484484 [_messagingUserDefaults setBool: autoInitEnabled
485485 forKey: kFIRMessagingUserDefaultsKeyAutoInitEnabled ];
486486 if (!isFCMAutoInitEnabled && autoInitEnabled) {
487- self.defaultFcmToken = [self FCMToken ];
487+ self.defaultFcmToken = [self .instanceIDProxy token ];
488488 }
489489}
490490
@@ -834,7 +834,7 @@ - (FIRMessagingNetworkStatus)networkType {
834834#pragma mark - Notifications
835835
836836- (void )didReceiveDefaultInstanceIDToken : (NSNotification *)notification {
837- if (![notification.object isKindOfClass: [NSString class ]]) {
837+ if (notification. object && ![notification.object isKindOfClass: [NSString class ]]) {
838838 FIRMessagingLoggerDebug (kFIRMessagingMessageCodeMessaging015 ,
839839 @" Invalid default FCM token type %@ " ,
840840 NSStringFromClass ([notification.object class ]));
You can’t perform that action at this time.
0 commit comments