Skip to content

feat: switch from FCM token to Firebase installation ID - #1911

Draft
boringcactus wants to merge 1 commit into
mainfrom
mth-qsvmkpxoprzr
Draft

feat: switch from FCM token to Firebase installation ID#1911
boringcactus wants to merge 1 commit into
mainfrom
mth-qsvmkpxoprzr

Conversation

@boringcactus

Copy link
Copy Markdown
Member

Summary

Ticket: Move from Firebase tokens to installation IDs

Swaps out the old FCM tokens for the new installation IDs everywhere. Pairs with mbta/mobile_app_backend#655.

iOS

  • [ ] If you added any user-facing strings on iOS, are they included in Localizable.xcstrings?
    • [ ] Add temporary machine translations, marked "Needs Review"

android

  • [ ] All user-facing strings added to strings resource in alphabetical order
  • [ ] Expensive calculations are run in withContext(Dispatchers.Default) where possible (ideally in shared code)

Testing

Updated unit tests where needed. End-to-end delivery test still needs to be done.


func application(_: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Messaging.messaging().apnsToken = deviceToken
Messaging.messaging().token { token, error in

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

question(non-blocking): What does the new code do here since it doesn't use the token? Is didRegisterForRemoteNotificationsWithDeviceToken hit if the device token isn't used anymore?

I am least familiar with how piece is set up, but it seems like the most obviously not 1-for-1 change, so figured I'd highlight it to learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The deviceToken here is the APNs token we get from iOS, and we still need to pass that to FCM so it can deliver messages correctly.

@boringcactus
boringcactus marked this pull request as draft August 6, 2026 19:59
@boringcactus

Copy link
Copy Markdown
Member Author

Things are busted; an eventual iOS bug fix should take care of things on iOS, but it’s not obvious what’s wrong on Android.

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