0

Apple documentation mentions certain scenarios when the device token may change :

APNs can issue a new device token for a variety of reasons like User installs your app on a new device, User restores device from a backup, User reinstalls the operating system, Other system-defined events.

Lets take one case where the User has reinstalled the IOS, then there is no way to know the old device token.

What is the way to update the old device token to a new device token ? Is there a way to find that the old device token is invalid ?

Does it mean that every time a new token is generated , the old device token information becomes stale and there is no way to find out that the old tokens are invalid.

References : Does a iOS Push notification device token change?

Vineet Singla
  • 1,609
  • 2
  • 20
  • 34
  • Your server that is sending the push notifications should monitor the response from APNS. When it indicates that a token is no longer valid then you should remove it from your database. – Paulw11 Feb 02 '21 at 11:23
  • The system sending the Push Notification doesn't get that kind of response from APNs – Vineet Singla Feb 02 '21 at 11:36
  • Then you will keep sending pushes to invalid tokens forever. The way to find out a token is not valid is to look for the 410 response from the apns service https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html – Paulw11 Feb 02 '21 at 11:45

0 Answers0