Search code examples
c#iospasskitapple-wallet

Apple Wallet: Device not registering to receive push notification for a pass


Recently, I've managed to create a pass with WebServiceUrl and AuthenticationToken in order to subscribe for future changes. Since I'm in active development I used http://localhost:5000/passes as a WebServiceUrl.

Created pass is correctly loaded in iOS Simulator, but when I try to add it to the wallet, device won't make a call in order to register for notifications using my API (POST request to {webServiceURL}/{version}/devices/ {deviceLibraryIdentifier}/registrations/{passTypeIdentifier}/{serialNumber}) as it should, according to the docs:

I've checked iOS Simulator Console that shows no signs of such a request.

Some interesting observations worth mentioning:

  • my first successfully created pass made this device registration call, but since that moment, it was never done again
  • device unregistering call (among other calls) is made every time pass is deleted from the wallet. I can see it in iOS Simulator Console and my API logs so apparently WebServiceUrl is valid and usable.

Solution

  • Provided Apple PassKit docs states:

    NOTE: Test updates on a device; the iOS Simulator app doesn’t register for push notifications.

    So basically that's it but what really bakes my noodle is that I'm pretty sure, that my first run of a test pass using iOS simulator made that call. Anyway, I ended up testing it on a physical device. That's it.