Search code examples
applepaypassbookwallet

Does the Device Library Identifier change with the Push Token?


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?


Solution

  • 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.