Work delivered at EPIC
An EPIC client wanted to offer its users a card they could add to Apple Wallet. That's the topic I took on, from reading the documentation to a working pass.
The .pkpass format is strict: an archive holding a precise pass.json, its images, a manifest with the hash of every file, and a signature made with an Apple certificate. A single mistake and the iPhone rejects the card, with no explicit error.
The pass is delivered to the client: its users can add their card to Apple Wallet. The web-service research lays the groundwork for updating the cards automatically.
Once it’s installed on an iPhone, a card doesn’t update by itself. To keep its data in sync, Apple provides a web service: the pass.json declares a webServiceURL and an authenticationToken, and the device then registers with the server. When the data changes, the server sends a push notification (APNs); the iPhone then asks for the list of updated passes and downloads their latest version.
I studied how this works (device registration, notifications, fetching the updated pass) to prepare automatic syncing of the cards. It isn’t in place yet.
Resources
Let's talk!