Search code examples
iospush-notificationios9passbook

Apple Mobile Wallet - how to send updated new pass coupon


Reference links & spacial THANKS to @Passkit:

1: how-to-make-a-push-notification-for-a-pass

2: how-to-use-changemessage-key-in-pass-json

im missing one part please i need guidance.

i'll send push notification using APNS service. im not able to figure-out, how i'll send my new pass.pkpass file or bundle to my costumer ? if answer is my web-service then how i'll know this request is for new or updated card request. Right now my web-service only updating database when any card removed or install.

im using passkit library and PHP to generate pass coupons dynamically. My API is in coldfusion.


Solution

  • This is a three step process.

    1. When a user installs a pass on their iOS device and there is a webserviceUrl value specified, the device will register itself, providing a push token.

    2. When the device receives the push notification, it will reach out to your API asking for a list of passes that have changed (using a timestamp). You return the serial numbers of all the passes that have been updated (for your pass type identifier).

    3. iOS will then request the new pass for each of the serial numbers. If will diff the passes and display the relevant changeMessage values.

    This is explained in more details in the developer guide: https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/PassKit_PG/Updating.html#//apple_ref/doc/uid/TP40012195-CH5-SW1