The sources describe how Passbook (now called Apple Wallet) utilizes push notifications to update passes on user devices. This process relies on a collaborative effort between the user’s device, Apple’s servers, and your servers.

Here’s how Passbook leverages push notifications for pass updates:

  • Web Service URL: When creating an updatable pass, you need to specify a webServiceURL key in the pass’s JSON file. This URL points to your web server, which handles pass registrations, updates, and unregistrations.
  • Device Registration: When a user adds a pass to their Passbook, their device automatically registers with your server using the provided webServiceURL. During registration:
    • The device sends its unique library ID and a push token.
    • Your server stores this information in a database, creating an association between the device, the pass, and the registration information.
  • Triggering Updates: When information related to a pass changes, your server initiates the update process:
    • Your server identifies the affected pass (using its pass type identifier and serial number) and retrieves the push tokens of all registered devices.
    • Your server sends a silent push notification to these devices via Apple Push Notification Service (APNs). The notification itself doesn’t contain any pass data.
  • Fetching Updates: Upon receiving the notification:
    • Passbook on the user’s device sends a request to your server (using the webServiceURL), asking for a list of updated passes.
    • Your server compares the device’s last update timestamp with its records and sends back a list of serial numbers for passes that have been modified since then.
  • Downloading Updates: Passbook then requests the updated data for each pass on the list from your server.
    • Your server authenticates the request using the device library ID and the authentication token associated with the pass.
    • If authenticated, your server sends the updated pass data to the device.
  • Displaying Changes: Passbook compares the new pass data with the old version and identifies changes. If a field with a change message (defined in the pass’s JSON) has been updated, Passbook displays a notification to the user, highlighting the specific change.

Key Points and Advantages:

  • Automatic Updates: Push notifications enable Passbook to update passes silently in the background, ensuring users have the most current information without manually refreshing.
  • Selective Updates: Only passes that have been modified since the last update are downloaded, conserving data and battery life.
  • Timely Notifications: Users receive immediate notifications about relevant changes, such as flight delays or gate changes, enhancing the usefulness of the pass.

Security and Privacy Considerations:

  • HTTPS Required: The communication between Passbook and your web server must use HTTPS to ensure secure transmission of sensitive data like push tokens and authentication tokens.
  • Authentication Tokens: Each pass has a unique authentication token, used by your server to verify the legitimacy of update requests.
  • Device Library ID: This identifier authenticates the device and its association with the registered pass.
  • Push Notification Security: Apple’s APNs provides a secure channel for delivering push notifications.

This system enables Passbook to seamlessly keep passes up-to-date without requiring user intervention, contributing to a better user experience.

Trending

Discover more from Digital Wallets Magazine

Subscribe now to keep reading and get access to the full archive.

Continue reading