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
fix(messaging): Throw exception if APNS token is not yet available #11400
Conversation
docs/cloud-messaging/client.md
Outdated
@@ -144,8 +144,20 @@ To retrieve the current registration token for an app instance, call | |||
ask the user for notification permissions. Otherwise, it returns a token or | |||
rejects the future due to an error. | |||
|
|||
Warning: From iOS SDK 10.4.0 and higher, it is a requirement that the APNS token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @kevinthecheung - documentation update that could do with a review, please 😄
Co-authored-by: Kevin Cheung <kevinthecheung@users.noreply.github.com>
…11400) Co-authored-by: Kevin Cheung <kevinthecheung@users.noreply.github.com>
@russellwheatley I have one doubt. I'm getting this exception, While calling subscribeToTopic method in iOS. Or What I have to do to avoid this exception? |
Description
The Apple event handler that receives the APNS token may not have been called before the User starts to make API requests such as
getToken()
&subscribeToTopic()
. We have set an exception when it isn't set and also updated documentation to reflect the requirement.Related Issues
closes #10625
closes #10656
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).This will ensure a smooth and quick review process. Updating the
pubspec.yaml
and changelogs is not required.///
).melos run analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?