Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update InstanceID to listen to a notification from Messaging #6286

Merged
merged 7 commits into from
Aug 19, 2020

Conversation

charlotteliang
Copy link
Contributor

@charlotteliang charlotteliang commented Aug 18, 2020

When we release Messaging that removes InstanceID dependency, Messaging will handle FCM token on its own. However, developers might still depend on both Messaging and InstanceID, each has its own cache for token, but share the same storage(keychain). We need to add a method in InstanceID to listen to a notification from Messaging for token refresh, if that happens, InstanceID will update its cache, but not storage, as Messaging already updated it.

We want developers to adopt this version before hand as we can't re-enforce iid version once messaging remove it from its dependency. So I updated the new version of messaging to depend on at least this version of IID.

Manual tested in the chen/fm-master branch which has the latest version of Messaging without IID dependency.
Add/delete token from Messaging API and try getToken in InstanceID should return the same token and FID.

Minor:
Fixed an issue that the local defaultFCMToken is not updated when calling tokenWithAuthorizedEntity:scope:options:handler. This cause developers won't get notified of token update. It is not discovered probably because not so many developers use this API.

@@ -1,3 +1,7 @@
# 2020-08 -- 4.5.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be 4.6.0 with the new functionality

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no public API change, I guess this is for better version managing?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor version updates aren't just for public API changes - they should be used for any changes that go beyond bug fixes. See https://semver.org/

FirebaseInstanceID.podspec Outdated Show resolved Hide resolved
FirebaseMessaging.podspec Outdated Show resolved Hide resolved
Firebase/InstanceID/CHANGELOG.md Outdated Show resolved Hide resolved
@charlotteliang charlotteliang merged commit fbcb4a1 into master Aug 19, 2020
@charlotteliang charlotteliang deleted the iid-delete branch August 19, 2020 00:25
@firebase firebase locked and limited conversation to collaborators Sep 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants