-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Decode old fcmToken format #12246
Decode old fcmToken format #12246
Conversation
Size Report 1Affected ProductsTest Logs |
Coverage Report 1Affected Products
Test Logs |
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.
It would be better to fix the token in the keychain.
Agreed, but so far I can't think of such a way. My thinking is that in order to fix the token in the keychain, we'd have to read from it to know what it is, which leads back to the current decoding issue.
Fix #12245.
If decoding of the FIRMessagingTokenInfo fails, fallback to the pre-10.19.0 code and migrate the keychain to the NSSecure encode.
Summary from @ncooke3:
a. the unsecure token was overwritten by the secure token & always read later as a secure token
b. the unsecure token was NOT overwritten yet and the fallback decode code path kicks into effect