Reputation: 209
Is there any possibilities for a device token to change after the app is installed and registered for the notification in any kind of scenarios.
Scenarios like:
Upvotes: 17
Views: 21020
Reputation: 477
My app successfully receives Firebase notifications under normal circumstances. However, I've noticed that after terminating the app (i.e., closing it completely) and reopening it, the FCM (Firebase Cloud Messaging) token undergoes a change. Typically, FCM tokens remain constant unless the user uninstalls the app, but in this instance, the token is unexpectedly altered. Consequently, notifications are not being received as the token has changed.
Upvotes: 0
Reputation: 5435
Previously in document it was like,
If the user restores backup data to a new device or reinstalls the operating system, the device token changes.
From new documentation here:
Important: To protect user privacy, do not attempt to use a device token to identify a device.
APNs can issue a new device token for a variety of reasons:
User installs your app on a new device
User restores device from a backup
User reinstalls the operating system
Other system-defined events
As a result, apps must request the device token at launch time, as described in APNs-to-Device Connection Trust and Device Tokens.
Upvotes: 23