Does a iOS Push notification device token change?

Jayanth Gowda picture Jayanth Gowda · Oct 21, 2016 · Viewed 14.5k times · Source

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.

Answer

Ronak Chaniyara picture Ronak Chaniyara · Oct 21, 2016

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/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html

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.