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 {
484
484
[_messagingUserDefaults setBool: autoInitEnabled
485
485
forKey: kFIRMessagingUserDefaultsKeyAutoInitEnabled ];
486
486
if (!isFCMAutoInitEnabled && autoInitEnabled) {
487
- self.defaultFcmToken = [self FCMToken ];
487
+ self.defaultFcmToken = [self .instanceIDProxy token ];
488
488
}
489
489
}
490
490
@@ -834,7 +834,7 @@ - (FIRMessagingNetworkStatus)networkType {
834
834
#pragma mark - Notifications
835
835
836
836
- (void )didReceiveDefaultInstanceIDToken : (NSNotification *)notification {
837
- if (![notification.object isKindOfClass: [NSString class ]]) {
837
+ if (notification. object && ![notification.object isKindOfClass: [NSString class ]]) {
838
838
FIRMessagingLoggerDebug (kFIRMessagingMessageCodeMessaging015 ,
839
839
@" Invalid default FCM token type %@ " ,
840
840
NSStringFromClass ([notification.object class ]));
You can’t perform that action at this time.
0 commit comments