From 952ec71907e0fbb896bce4e324a4cb02914ac724 Mon Sep 17 00:00:00 2001 From: Chen Liang Date: Thu, 15 Oct 2020 10:58:08 -0700 Subject: [PATCH 1/2] missing handler checking cause crash --- Firebase/InstanceID/FIRInstanceIDTokenManager.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Firebase/InstanceID/FIRInstanceIDTokenManager.m b/Firebase/InstanceID/FIRInstanceIDTokenManager.m index bb9b7787c8f..9fa856e90b4 100644 --- a/Firebase/InstanceID/FIRInstanceIDTokenManager.m +++ b/Firebase/InstanceID/FIRInstanceIDTokenManager.m @@ -89,7 +89,9 @@ - (void)fetchNewTokenWithAuthorizedEntity:(NSString *)authorizedEntity NSError *_Nullable error) { FIRInstanceID_STRONGIFY(self); if (error) { - handler(nil, error); + if (handler) { + handler(nil, error); + } return; } NSString *firebaseAppID = options[kFIRInstanceIDTokenOptionsFirebaseAppIDKey]; From b45494fb8c78e11f4483a97f2944cb9009b567a6 Mon Sep 17 00:00:00 2001 From: Chen Liang Date: Thu, 15 Oct 2020 11:00:41 -0700 Subject: [PATCH 2/2] changelog should be in IID not messaging --- Firebase/InstanceID/CHANGELOG.md | 1 + FirebaseMessaging/CHANGELOG.md | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Firebase/InstanceID/CHANGELOG.md b/Firebase/InstanceID/CHANGELOG.md index 33655d6ffee..50dafcd5cec 100644 --- a/Firebase/InstanceID/CHANGELOG.md +++ b/Firebase/InstanceID/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased -- 7.0.0 - [changed] Deprecated private `-[FIRInstanceID appInstanceID:]` method was removed. (#4486) +- [fixed] Fixed an issue that APNS token is not sent in token request when there's a delay of getting the APNS token from Apple. (#6553) # 2020-09 -- 4.7.0 - [deprecated] Deprecated InstanceID. For app instance identity handling, use FirebaseInstallations. For FCM registration token handling, use FirebaseMessaging. (#6585) diff --git a/FirebaseMessaging/CHANGELOG.md b/FirebaseMessaging/CHANGELOG.md index 93e84c7aee8..42198a39238 100644 --- a/FirebaseMessaging/CHANGELOG.md +++ b/FirebaseMessaging/CHANGELOG.md @@ -2,7 +2,6 @@ - [changed] Remove the deprecated FCM direct channel API and Upstream send API. (#6430) - [changed] The `messaging:didReceiveRegistrationToken:` should be able to return a null token. Update the API parameter fcmToken to be nullable. (#5339) - [fixed] Fixed an issue that downloading an image failed when there's no extension in the file name but MIME type is set. (#6590) -- [fixed] Fixed an issue that APNS token is not sent in token request when there's a delay of getting the APNS token from Apple. (#6553) # 2020-09 -- v.4.7.1 - [added] InstanceID is deprecated, add macro to suppress deprecation warning. (#6585)