Build, run & install

Have an Agent register a pass type ID and make its certificate, keep the signing files safe, try a sample pass, and turn on Wallet if your app should read its passes.

A Wallet pass is a card people keep in Apple Wallet, such as a membership card, a ticket or a coupon. Each kind of pass you issue has a pass type ID on your Apple team, and a certificate that signs the passes. Your Agents register both. Apple’s Create Wallet identifiers and certificates ↗ page lists two uses: issuing and updating passes, which needs the pass type ID and its certificate, and reading people’s passes in your app, which needs the Wallet capability on your App ID.

Before you start

Register a pass type ID

Ask in the Project’s chat, for example:

Register a pass type ID called "Notes Member Card" with the identifier pass.com.example.notes.member.

The Agent registers it with asc pass-type-ids create, which takes an identifier and a name. The command’s help gives pass.com.example as an example of an identifier. To see the ones you have, ask “Which pass type IDs does my Apple team have?” The Agent lists them with asc pass-type-ids list.

Make the pass certificate

Ask, for example:

Make the Wallet pass certificate for pass.com.example.notes.member. Keep the private key out of the repository, and tell me where you saved everything.

The Agent makes it with asc certificates create --certificate-type PASS_TYPE_ID and the pass type ID. The certificate Apple returns pairs with the private key its certificate signing request (CSR) was made from, so a pass is signed with the two together:

You What the Agent does
Have no CSR It makes the private key and the request on the spot (--generate-csr) and writes each to a file it names (--key-out, --csr-out), on the computer it works on.
Have a CSR, for example from the tool that will sign your passes Attach the file to your message, as it is (see Send photos, files and sketches to an Agent). The private key stays wherever the request was made.

Apple’s answer includes the certificate, so the Agent can save it as a file next to the key, or send it to you in the chat. The certificate (a .cer file) isn’t secret, so the chat is fine for it. The key is secret: don’t ask for it in the chat. See Keep the signing files safe.

For passes people hold near a reader, asc can ask for a PASS_TYPE_ID_WITH_NFC certificate instead. Its help doesn’t say what Apple needs before it issues one, and this page doesn’t cover NFC passes.

Keep the signing files safe

The command’s help says to keep the private key out of the repository and out of logs. Together with the certificate, it signs passes under your pass type ID.

  • Ask the Agent to save the key in a folder the project’s .gitignore leaves out, such as secrets/, and to tell you its path. That keeps it out of the repository, a shared link and an export of the source: see Share or export a project’s source. It still shows in Files, dimmed, where anyone in the Team can open it.
  • To take a copy of the key for your server, open it in Files and use Export (see Find the files and documents Agents made), or ask the Agent to send it to you in your DM with that Agent and choose Save As… (see Create group chats and talk to one Agent). Don’t ask for the key in the Project’s chat: everyone in the chat can open it, and you can’t recall a message the Agent sent.
  • If the tool that signs your passes wants the certificate and the key as one password-protected file, the Agent can package them with asc certificates export. It reads the password from a file and never prints the key. Keep that file and the password as safe as the key.

To sign passes on a server outside AirBuild, take the files with Export (above) and install them there. Where the passes get signed is up to you and your Agents: tell them in the chat.

Make and try a pass

Making the passes themselves is part of your app or its server, which the Agents write. Ask, for example:

Make a sample member card pass for pass.com.example.notes.member with my name and a QR code, sign it with the pass certificate, and send it to me here.

Tap the pass in the chat to open it in a preview, or touch and hold it and choose Open In… (on the Mac, Open in Default App). See Send photos, files and sketches to an Agent. This page doesn’t know whether the preview offers to add the pass to Wallet.

Let your app read its passes

If your app should read the passes it issued, Apple’s page says the app needs the Wallet capability. Ask, for example:

Turn on Wallet for the app with pass.com.example.notes.member, and show the member's card on the Account screen.

The Agents add the capability to the app and its App ID, then build again. See Turn on iCloud, App Groups or another capability, and check it on a device as that page says.

See, change or remove

Ask asc
“Which certificates does pass.com.example.notes.member have, and when do they expire?” pass-type-ids certificates list
“Rename the pass type ID to Notes Card.” pass-type-ids update --name
“Delete the pass type ID pass.com.example.old.” pass-type-ids delete, only with --confirm, so the Agent asks you first.
“Revoke the old pass certificate.” Agents can’t: revoking is your step in your Apple Developer account. See Apple’s Revoke a certificate ↗.

Questions

Can I set this up in AirBuild without an Agent?
No. AirBuild has no screen for pass type IDs or pass certificates. Ask an Agent, or use your Apple Developer account on the web.
The Agent says the output file already exists.
A key or request file from an earlier try is already at that path, and the command doesn’t replace it unless told to (--force). If a certificate was made from that key, keep the file: the certificate only works with it. Ask the Agent to save the new files under other names instead.
The Agent says the CSR file is empty.
The file you attached has nothing in it. Make the request again and attach it to a new message, or let the Agent make one.
Do I need Apple Pay for passes?
No. Passes have their own pass type ID and certificate. To take payments, see Take payments with Apple Pay in your app.
What if the private key is lost?
If the key is lost, the certificate made from it can’t sign passes any more. Ask the Agent to make a new certificate, then revoke the old one in your Apple Developer account.