1

There are numerous articles on "how to implement update service" is already present. However, I have serious question below:

when will pass get updated technically? what is the trigger for updating? When will be passbook's update service be called?

  1. when update push notification is clicked by user

  2. when pass is opened by user

  3. silently done in background

  4. when automatic update is off and user opens a pass

    Please help

Community
  • 1
  • 1

1 Answers1

2

Pass updates can be initated in one of two ways:

  1. The users does a pull-to-refresh on the pass.
  2. You send a push notification to the device.

In the case of number 2, the device responds to the push notification by reaching out to the service specified by the pass's WebServiceUrl.

It sends the device identifier and pass type identifier. The web service is responsible for determining the passes that need updating and it returns a set of serial numbers. It does this by looking at the update tag and applies whatever mechanism makes sense for the pass.

The device will then request an updated pass for each of these serial numbers.

The process is described in far more detail in Apple's Documentation:

https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/PassKit_PG/Updating.html#//apple_ref/doc/uid/TP40012195-CH5-SW1

Tomas McGuinness
  • 7,651
  • 3
  • 28
  • 40
  • Sure. does user have to touch-open the notification? what if user didn't care about the notification? when does update is triggered. – Sanjai Prabahar Jul 19 '17 at 14:17
  • The notification you send to trigger the update is a background one, so it's never displayed. – Tomas McGuinness Jul 19 '17 at 15:01
  • Thank you Tom. I didn't know that. Also, does this means that; it is very similar to Background fetch and all limitations for background fetch applies to this silent notification as well? – Sanjai Prabahar Jul 19 '17 at 15:24
  • That I don't know. It would be easy enough to test though. – Tomas McGuinness Jul 20 '17 at 12:53
  • so the notification triggers the update. This means any notification I send for this specific app? Or any notification that the device gets? Will it try to update the pass each time my app receives any notification or just a specific one? If it's a specific one, then where can I get this specific information? – Johhan Santana Mar 16 '21 at 15:37
  • was able to get it to work. It's good to know that the topic for the push notification needs to be the same as the `passTypeIdentifier` you use in the pass in order for it to work correctly. – Johhan Santana Mar 16 '21 at 19:53