0

According to this answer, push tokens are regularly rotated to help with privacy, and that my web service API implementation will see this as a new registration.

Does this mean that the web service API registration endpoint must detect the same device library identifier with a different pushToken as a different device? Or, does the device library identifier also change with the pushToken?

Kev Xlr
  • 33
  • 1
  • 3

1 Answers1

0

Both the device library identifier and the push token are regularly randomised. When a push token is rotated, you will receive a registration request with a new device library identifier and push token. You will not receive an I register request for the old identifier and token.

When making a push request for a token that has been rotated, you will receive a response from APNS letting you know that the token is no longer valid.

Therefore, when a device has rotated it’s token and you haven’t sent a push request, your database should show it registered with 2 identifiers.

PassKit
  • 12,231
  • 5
  • 57
  • 75
  • OK, so just confirming, anytime a device rotates its push token, it also therefore changes its device library identifier. Thanks! – Kev Xlr May 28 '20 at 18:57
  • This seems to be the case. Apple don’t publish exactly what happens, but this has been my experience. A device id may be used multiple times with different push tokens where you have multiple passes. But when the token changes, the device id typically changes too. – PassKit May 29 '20 at 01:03
  • Hi PassKit, based on that logic would it be safe to assume that when receiving a new pass registration request from Apple, if the deviceLibraryIdentifier already exists in my database, but the push token I have stored is different from the one being received, that we can simply update the push token instead of creating a second entry for this device id? I'm going by the assumption that only the latest push token for a device id will be valid, but I can't find any documentation for or against this. – paddyfields Nov 16 '22 at 11:16