Does a iOS Push notification device token change?

2019-02-10 16:45发布

问题:

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:

  • App update
  • iOS update or in any other random scenario's.

回答1:

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:

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html

Important: To protect user privacy, do not attempt to use a device token to identify a device.

Device tokens can change after updating the operating system, and always change when a device’s data and settings are erased. Whenever the system delivers a device token to an instance of your app, the app must forward it to your provider servers to allow further push notifications to the device.