Passbook: Type ID and certificate

Related posts about Passbook:

In order to create passes and allow them to be recognized by Passbook, they have to be signed with a valid certificate. The certificate is associated to a specific type of pass, so we need to create a Pass Type ID and a certificate for each kind of pass we want to support.

To create a Pass Type ID, log in into your developer account, navigate to your member center and to the Certificates, Identifiers & Profiles page. In the identifiers section, select the Pass Type IDs option. From this page the passbook Type IDs are listed and we can edit them, delete them or create a new one. Click on the plus icon button to create a new ID. Type a description and type the ID which has to start with the “pass.” string.

Register iOS Pass Type ID

Follow the next steps and the ID registration will be completed. The new ID should appear in the Pass Type IDs list.

To create the Pass Type ID Certificate, open the Production page from the Certificates section and click on the plus icon button to create a new one. Check the Pass Type ID Certificate option and click on the Continue button. In the next page we have to select the ID created before. Click on the Continue button.

iOS certificate of the Pass ID

Finally we have to upload our Certificate Signing Request file (.certSigningRequest). This request file can be obtained from the Keychain of a MacOS computer, but probably you already generated it when you created your app or created other certificates. Upload this request file, click on the Generate button and then we willl be able to download the certificate by clicking the Download button. The downloaded certificate is a .cer file.

Download Pass certificate

Read More

Passbook: inside a pass

Related posts about Passbook:

After introducing Passbook here, this post will show what is really a passbook pass.

A passbook pass is just a compressed file, a .zip archive, but with a “.pkpass” extension. This compressed pass must be cryptographically signed.

Zip to pass

The .pkpass includes 3 necessary files:

  • manifest.json
    The manifest is a JSON file that lists the archives in the .pkpass, calculate the SHA-1 hash of their content and store the hash in a dictionary. The manifest file itself and the signature file are not included. An example of the manifest file content is:

  • pass.json
    A JSON dictionary that defines the pass. It describes the type of pass and the content of its fields. The JSON structure is described in detail in the Apple developer library.
  • signature
    This file is a detached PKCS #7 signature of the manifest file. The signature is created using the private key associated with our signing certificate and using the WWDR intermediate certificate. The Worldwide Developer Relations (WWDR) certificate can be downloaded from here.

The zip archive also contains the images of the pass. The images are included inside the pass using standard names as we will see in another post.

To support localization, the structure of the .pkpass archive changes. For each supported location, it is necessary to create a subfolder to separate the files that depend on the location. For example create a subfolder named “es.lproj” and create a strings file named “pass.strings” that contains the Spanish strings. These strings will be referenced from the pass.

The directory structure:

Read More

Introduction to Passbook

Related posts about Passbook:

Passbook is an application included in iOS 6 which allows a user to store tickets or passes. These passes can be downloaded from other applications, from the browser or from the email. They have a front space to show the most important data and a back space to show some details and additional options.

Passbook is not available for iPad.

Back options

On the back of some passes, the user can activate the “Show On Lock Screen” option. This option will show the pass in the lockscreen at a specific hour or location. The option “Automatic Updates” will update the pass automatically without any user interaction.

In order to provide this options to our users, we need to have implemented an Apple Push Notification Service.

Types of passes

There are 5 types of passes:

  • Boarding Pass. This pass style is appropriate for passes used with transit systems such as train tickets, airline boarding passes, and other types of transit.
  • Event ticket. This pass style is appropriate for passes used to gain entry to an event like a concert, a movie, a play, or a sporting event.
  • Store Cards. This pass style is appropriate for store loyalty cards, discount cards, points cards, and gift cards.
  • Coupons. This pass style is appropriate for coupons, special offers, and other discounts.
  • Generic. This pass style is appropriate for any pass that doesn’t fit into one of the other more specific styles.

Source: via Kate on Pinterest


Passes contain barcodes that can be scanned to display their information. Passbook supports the following 2D barcode formats: QR, Aztec and PDF417. Next to the barcode image, we can add a text label to make the barcode human-readable in case it could not be scanned.

Best Practices

In the Passbook Programming Guide, there are some recommendations to take into account when designing and creating our passes. I highlight the following best practices:

  • Add a link to your application in the back of the pass.
  • Use an alternative text to the barcode.
  • Create policies regarding when passes can be redeemed. Remember that these policies are your responsability: control duplicates and expiration dates.
  • On the front space, the contents of fields must be brief. Show the rest of the information on the back of the pass.

Passes in Android

There are some applications in Google Play that import and store Passbook passes, so Android users can choose between different options.
One of the best is PassWallet from Attido Mobile (PassWallet – Passbook + NFC).

Read More