问题
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?
- when update push notification is clicked by user
- when pass is opened by user
- silently done in background
when automatic update is off and user opens a pass
Please help
回答1:
Pass updates can be initated in one of two ways:
- The users does a pull-to-refresh on the pass.
- 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
来源:https://stackoverflow.com/questions/45168068/apple-wallet-passes-update-calls-trigger