Apple Wallet Pass Series (Part 1): Navigating Certificate Generation
Learn how to generate and set up the required certificates for Apple Wallet pass creation
Before you start on issuing Apple Wallet Cards, you need to pay the customary Apple Tax, or as they call it "sign up for an apple developer account"
Apple Developer Account (99$ USD), you can learn more about the account details here and you can sign up for an account here.
To generate your apple pass you will need three things:
-
Signer Certificate
-
Signer Certificate Key
-
WWDR (Apple WorldWide Developer Relations) G4 Certificate (visit Apple PKI Portal to download it)
The following is how you get the Signer Certificate
and the Signer Certificate Key
.
-
After signing up and agreeing to their terms of service you can jump to their "Certificates, Identifiers & Profiles" page at this link. In this page you put in a value for a description ( this is only for your use so put in something useful) and a Identifier, the identifier should usually follow a reverse domain name style so pass.com.YOURDOMAIN.SOMESUBDOMAIN. Save this identifier as you will need it later for you the pass.json
-
Click the "Register" button on the following page.
-
Now you should see a page with a list of identifiers, you can either look for the pass you just registered or search in the search button or filter by Pass Type IDS and look for it, once you find it click on it.
-
You should see a page which has a button for "Create Certificate" click on it and then just keep that page open while you complete the generation of your signing certificates
-
Open your terminal and generate your private key. This will be your signerKey in the next steps (make a copy of it and paste it in your finilzed files list)
- Generate a CSR using your private key. The final file should have a
.csr
extension. You'll be prompted to insert a few pieces of information one per prompt. Continue reading.
- In the required information, you'll have to fill it out, you can also just press enter to skip them all. After the email address, you won't need any further information. So press Enter until you the end.
Country Name (2-letter code) [AU]: SA
State or Province Name [Some-State]: Saudi Arabia
Locality Name []:
Organization Name [Internet Widgits Pty Ltd]:
Organizational Unit Name []:
Common Name []:
Email Address []: your-email
-
Take the generated file
request.certSigningRequest
and upload it to the provisioning portal at step 4 (you can fill out the pass certificate name however you want). Once processed, you'll be able to download a certificate likepass.cer
. At this point also noted down thepassTypeIdentifier
andteamIdentifier
you have, thepassTypeIdentifier
is what you initally input, theteamIdentifier
can be found at the top right hand corner of the page where you download the certificate. -
At this stage I would recommend you create a folder for the finalized files you will be using to store them in and then you can get rid of the intermediary files)
-
Once downloaded the certificate, you'll have to convert it to
.pem
(from a DER-encoded to PEM Base64 encoded). Save the result somewhere safe. You'll be using it in your application assignerCertificate.pem
, this file should be save in the finalized folder. This will be the signer certificate key we will be using.
- Take the WWDR Certificate you downloaded earlier and convert it to a
.pem
base64 by repeating step 8. You'll be using it in your application for the keywwdr
. Save the result somewhere safe.
- Save the outputed wwdr.pem into the finalized files folder.