For Passbook, quite a few things have to be in place in order for a push to trigger a notification on a device. From your form, you will need to implement everything to follow this flow:
- post the data from your form to your server and update the pass record(s) in your database
- retrieve the device pushToken(s) for the device(s) that require the updated pass from your devices table (these should be linked to the pass table with a common key)
- connect to the production APNS using the PassID certificate that matches the
passTypeIdentifier
of the changed pass
- send an APNS message containing an empty payload for each device
- wait a few seconds......
- upon receiving the push, each device will contact your web service using the 'Getting the Serial Numbers for Passes Associated with a Device' method
- your web service must respond with a json dictionary containing the serial(s) of the updated pass (note only send serials relevant to the device, if you send a serial of a pass that is not installed, you will receive error log messages)
- when the device get's your response, it will call your service again with the 'Getting Latest Version of a Pass' for the serial you sent it.
- dynamically build the new .pkpass bundle and send as a response with the correct MIME type and 'Last-Modified' header
- providing that a field value has changed, and that field dictionary contains a changeMessage key, a notification will show on the device. If nothing has changed, or if no changeMessage is set, the above will still happen, the pass will update but you will not see a notification.