I made a pass web service already. Next, I need to make a push notification when my pass is updated. From Updating a pass of passkit programming guide, it is not in detail. Can you explain this in detail ?
The requirements and protocol for push notifications is documented in the Push Notification Programming Guide.
There are a few special considerations for Passbook:
pushToken
that your web service received when the device registered the pass {"aps":""}
alert
, badge
, sound
and custom property keys are all ignored - the push's only purpose is to notify Passbook that your web service has a fresh pass. The notification text will be determined by the changeMessage
key in pass.json and the differences between the old and the new .pkpass bundles changeMessage
string should contain %@
if you wish for the content of the value
key to be displayed. Change messages may have static text in addition to the %@
variable, such as this: "changeMessage":"New updates: %@"
. If no %@
is provided, a generic message with the kind of pass is displayed: "Store card changed"
.Note that push updates can be implemented independently of your web service. Apple provide some sample objective-c code in Listing 5-1 here.