[go: nahoru, domu]

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

[Messaging] - Validate APNS token in the configure flow #10789

Merged
merged 2 commits into from
Feb 7, 2023

Conversation

aashishpatil-g
Copy link
Contributor
@aashishpatil-g aashishpatil-g commented Feb 7, 2023

Discussion

The FirebaseApp.configure() flow triggers a FCM token fetch, which can be racy and occur before we have received and set an APNS token. The change in this PR validates that we have an APNS token in the configure flow before fetching the FCM token.

This PR addresses the scenario 1 identified in this comment - #10679 (comment)

Should fix #10742

@google-oss-bot
Copy link
google-oss-bot commented Feb 7, 2023

Coverage Report 1

Affected Products

  • FirebaseMessaging-iOS-FirebaseMessaging.framework

    Overall coverage changed from 60.21% (a79d472) to 60.14% (ce35e66) by -0.06%.

    FilenameBase (a79d472)Merge (ce35e66)Diff
    FIRMessaging.m55.68%55.01%-0.67%
    FIRMessagingPendingTopicsList.m89.02%89.80%+0.78%

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/KjWA9LcY1B.html

Copy link
Contributor
@charlotteliang charlotteliang left a comment

Choose a reason for hiding this comment

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

On a higher level, should we also think about only trigger fcm token request when messaging apns token is set (I believe that should happen every time app starts) rather than trigger at configure startup time.

FirebaseMessaging/Sources/FIRMessaging.m Show resolved Hide resolved
@aashishpatil-g aashishpatil-g added this to the 10.6.0 - M128 milestone Feb 7, 2023
@aashishpatil-g aashishpatil-g merged commit 75a7c2a into master Feb 7, 2023
@aashishpatil-g aashishpatil-g deleted the ap/configure-check-apns branch February 7, 2023 22:29
@firebase firebase locked and limited conversation to collaborators Mar 10, 2023
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.

[FirebaseMessaging] FirebaseApp.configure() triggers "APNS device token not set before retrieving FCM Token"
4 participants