Skip to content

Conversation

@tom-anders
Copy link
Collaborator

getAPNSToken() is the only iOS specific thing that happens in this file, so I think there's a high probabillity that the issues are related to that.

According to
https://firebase.google.com/docs/cloud-messaging/flutter/get-started we need to get permission before calling getAPNSToken(). Currently it looks like there could be a race condition where the connectivity change listener fires before we call requestPermission(). Fix this by moving the ref.listen() below the requestPermission() call.

getAPNSToken() is the only iOS specific thing that happens in this file,
so I think there's a high probabillity that the issues are related to
that.

According to
https://firebase.google.com/docs/cloud-messaging/flutter/get-started we
need to get permission *before* calling getAPNSToken(). Currently it
looks like there could be a race condition where the connectivity change
listener fires before we call requestPermission(). Fix this by moving
the ref.listen() below the requestPermission() call.
@tom-anders tom-anders requested a review from veloce December 19, 2025 10:46
@veloce
Copy link
Contributor

veloce commented Dec 21, 2025

thanks!

@veloce veloce merged commit 77200c6 into lichess-org:main Dec 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants