2

I have made an implementation which i can create passes for apple wallet. Once the device registers with server will push token unique for this device or will change eventually in future? If yes, what are the reasons for that?

ppavl
  • 21
  • 1

1 Answers1

2

Yes - to help with privacy, the push tokens are regularly rotated - this may occurs at random, or with changes in hardware (user transferring to a new phone), or often with iOS upgrades.

Your web-service API implementation will see this as a new registration request, and you will only learn that the old token is invalid through either the feedback APNS API (now deprecated), or by receiving a ExpiredProviderToken (403) response from the newer HTTP2 APNS API.

PassKit
  • 12,231
  • 5
  • 57
  • 75
  • thanks for the reply. I am trying to figure out how to link which passes are installed on a specific device. But if the device identifier and push token changes how can i create the above mapping ? The relationship of pass and device which i implement for the updating process is exactly as instructed https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/PassKit_PG/Updating.html#//apple_ref/doc/uid/TP40012195-CH5-SW1 – ppavl Jan 22 '19 at 19:10
  • You will be notified of changes through the registration endpoint of the web service. This URL includes the `passTypeIdentifier` and `serialNumber` and is authenticated with the `authenticationToken` which should be all you need to map a pass to a device ID and token. – PassKit Jan 23 '19 at 04:20
  • 1
    I am asking this because i had an issue where a device which added three passes on wallet, for each pass created the device send me different device identifier and the same push token. As a result, on the update process when the device calls for serial numbers, will use the last device identifier which created and this device identifier to my database is registered only with the last pass created because server identifies that device as a new device.So this was a problem because i couldn't update the all passes, just the last one. – ppavl Jan 23 '19 at 10:03
  • Understood. Sounds like this could be a bug with Apple’s implementation. I would suggest opening a bug report. – PassKit Jan 23 '19 at 10:06
  • We are experiencing the same: same push token, different devise identifier. Did you find anything? – coorasse Mar 06 '23 at 07:20