TechBuzzPro

Create Custom Wallet Pass for iOS 12+

· 4 min read · Phones & Tablets

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can create a custom wallet pass for iOS using Apple’s PassKit system. This allows you to generate passes—like event tickets, coupons, or loyalty cards—that users can add to their Apple Wallet. The process requires technical setup involving a developer account, digital signing, and a web service, but once configured, you can distribute passes via email, websites, or apps.

What You'll Need

  • An Apple Developer Program account (paid)
  • A Mac with Xcode installed
  • A web server or hosting service to serve the pass file
  • Pass signing certificate (generated through Apple Developer portal)
  • Basic knowledge of JSON, command-line tools, and web servers
  • A valid Apple Push Notification (APNs) certificate (optional, for updates)

Step-by-Step

  1. Log in to the Apple Developer portal and navigate to Identifiers > Pass Types. Register a new pass type identifier with a unique reverse-domain style string (e.g., com.example.pass.coupon).
  2. Generate a Certificate Signing Request (CSR) using Keychain Access on your Mac. In Keychain Access, go to Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority. Save the private key and CSR file.
  3. Upload the CSR to the Apple Developer portal under the pass type identifier to generate a pass signing certificate. Download the certificate and install it on your Mac.
  4. Export the certificate and private key as a .p12 file. Convert it to .pem format using the OpenSSL command: openssl pkcs12 -in certificate.p12 -clcerts -nokeys -out certificate.pem and openssl pkcs12 -in certificate.p12 -nocerts -out key.pem.
  5. Create a folder for your pass. Inside, add a pass.json file containing the pass structure. Include required fields: formatVersion, passTypeIdentifier, teamIdentifier, serialNumber, and organizationName. Add relevant content like description, logoText, and a barcode object.
  6. Add design assets (logo@2x.png, icon.png, etc.) in the same folder. Ensure they follow Apple’s size and format guidelines (PNG, correct dimensions, no transparency issues).
  7. Compress all files (excluding the .p12 and .pem) into a ZIP archive, then rename it to pass.pkpass. This is your unsigned pass bundle.
  8. Sign the pass using OpenSSL. First, generate a SHA1 hash of the pass.json file and save it as manifest.json. Then sign the manifest: openssl smime -binary -sign -certfile AppleWWDRCA.pem -signer certificate.pem -inkey key.pem -in manifest.json -out signature -outform DER -noattr.
  9. Place the manifest.json, signature, and all assets into the pass.pkpass package. Re-zip if needed.
  10. Host the pass.pkpass file on a secure (HTTPS) web server. Users can download it directly or you can embed it in an email with the correct MIME type (application/vnd.apple.pkpass).
  11. To enable push updates, register a device using the pass’s serial number and web service URL. Use the APNs certificate to send update notifications when pass data changes.
  12. Test the pass by opening it on an iOS device. Tap the file to preview and add to Wallet. Verify all data, styling, and barcode display correctly.

Common Mistakes

  • Using HTTP instead of HTTPS for hosting—the pass will not open.
  • Incorrect JSON syntax in pass.json—validate using a JSON linter.
  • Missing required images like icon.png—this prevents the pass from loading.
  • Wrong certificate type—must use the Pass Type ID certificate, not iOS app or push certs.
  • Forgetting to include manifest.json or signing it improperly—results in a “Cannot be opened” error.

Tips

  • Use Apple’s PassKit documentation to validate your pass structure.
  • Test passes on physical devices—simulators may not fully support Wallet features.
  • Keep serial numbers unique—duplicate serials prevent multiple passes from being added.
  • Use the userInfo field to store custom data for backend tracking.
  • Enable background updates via web service URL for dynamic content.

Troubleshooting

If the pass fails to open, first verify the file extension is .pkpass and served over HTTPS. Check that manifest.json contains SHA1 hashes of all files in the bundle. Use the shasum -a 1 command in Terminal to verify hashes match. If the signature is invalid, re-export the .p12 and regenerate .pem files. If the pass opens but shows errors, inspect the pass.json for typos or missing required keys. Restart the device if Wallet appears stuck. For push updates not working, confirm the APNs certificate is valid and the web service responds to registration/unregistration calls.

Frequently Asked Questions

Can I create a wallet pass without a Mac?

No, because you need Keychain Access to generate certificates and sign passes. Xcode tools are required for proper signing.

Do I need a paid Apple Developer account?

Yes. Free accounts cannot create pass type identifiers or generate the required certificates.

Why does my pass say “Invalid” or not open?

This is usually due to an invalid signature, missing manifest, or incorrect certificate. Double-check your signing process and file structure.

Can I update a pass after it’s added to Wallet?

Yes, if you set up a web service and include a webServiceURL in the pass. Users must enable updates when adding the pass.

Are custom passes compatible with iOS 12 and later?

Yes, the PassKit format used here is supported from iOS 6 onward, so iOS 12+ devices will display them correctly.

Can I distribute passes via email?

Yes, attach the .pkpass file and ensure your email server supports the application/vnd.apple.pkpass MIME type.