For the complete documentation index, see llms.txt. This page is also available as Markdown.

Wallet Creating Passes - iOS

This page covers the part that happens before you ever call Wallet.addPasses — building and signing the .pkpass file itself. WebToNative never creates, edits, or signs a pass; it only hands whatever .pkpass URL or base64 data you give it to Apple Wallet. See Google Wallet / Apple Wallet for the JS API this feeds into, and Google Wallet (Android) for the Android side.

Unlike Google Wallet, there's no live API call per pass — you build and sign an actual file, once per pass, on a Mac.

Prerequisites

  • An active Apple Developer Program membership.

  • A macOS machine with Keychain Access available.

  • The WWDR (Worldwide Developer Relations) intermediate certificate installed.


1. Create the Pass Type ID

  1. Log in to the Apple Developer Portal.

  2. Navigate to Certificates, Identifiers & Profiles → Identifiers.

  3. Click + (Add), select Pass Type IDs, and click Continue.

  4. Enter a description and set the identifier — e.g. pass.com.example.loyalty.

  5. Click Continue, then Register.

2. Generate a Certificate Signing Request (CSR)

  1. Open Keychain Access on your Mac.

  2. Keychain Access → Certificate Assistant → Request a Certificate from a Certificate Authority…

  3. Enter your email address and name. Leave CA Email Address blank.

  4. Select Saved to disk and click Continue.

  5. Save the resulting .certSigningRequest file.

3. Generate the Pass Type ID Certificate

  1. In the Developer Portal, go to Certificates and click + (Add).

  2. Under Services, select Pass Type ID Certificate and click Continue.

  3. Name the certificate and pick the Pass Type ID you created in step 1.

  4. Click Continue, then Choose File to upload the CSR from step 2.

  5. Click Continue, then Download to get pass.cer.

4. Install the Certificate into Keychain

  1. Double-click the downloaded pass.cer to import it into Keychain Access.

  2. In Keychain Access, select the login keychain and open the My Certificates tab.

  3. Confirm your new certificate is listed as Pass Type ID: <your identifier>.

  4. Expand it — a private key should be nested directly underneath. If it isn't, the CSR/certificate pairing didn't complete correctly.

5. Verify the WWDR Intermediate Certificate

Signing requires Apple's WWDR (Worldwide Developer Relations) intermediate certificate to be present and valid in your Keychain. If it's missing or expired, download the current one from Apple's PKI repository and install it.


6. Get a Sample Pass Bundle

A .pass bundle is just a folder: a pass.json file plus images (icon.png, logo.png, and their @2x/@3x variants). Rather than building one from scratch, start from Apple's own samples:

  1. From Apple's PassKit documentation, download the Wallet Support Materials (sample project archive).

  2. Unzip it — inside is a set of sample bundles (e.g. BoardingPass.pass, Coupon.pass, Generic.pass) and an Xcode project called signpass, which you'll use to sign passes in step 8.

  3. Pick the sample closest to what you're building and open its pass.json.

  4. Update passTypeIdentifier and teamIdentifier to match your own configuration, and adjust the rest of the fields for your pass:

7. Build the signpass Tool

  1. Open signpass.xcodeproj (found inside the Wallet Support Materials you downloaded) in Xcode.

  2. Product → Build (Cmd+B).

  3. Locate the compiled binary — right-click it under Products in Xcode and choose Show in Finder — and note its full path.

8. Sign the Pass

In Terminal, run signpass against your .pass folder:

signpass generates the manifest (hashing every file in the bundle), signs it using the Pass Type ID certificate from your Keychain, and zips the result into a single .pkpass file — verify BoardingPass.pkpass was created alongside the source folder.

9. Convert to Base64 (Optional)

If you'd rather send the pass as data than host it at a URL, base64-encode the .pkpass:

The contents of boardingpass_base64.txt are the string you hand to Wallet.addPasses as base64s.


Handing It to WebToNative


See Also

Last updated