20.0. Introduction

We’re all familiar with coupons and tickets. For instance, you may go to a coffee shop that gives you a loyalty card that offers you a free cup of coffee after you have accumulated some number of stamps for previous coffee purchases. We also use coupons when we shop. You can buy X amount of food and the shop may give you a coupon to spend when you next shop there.

Figure 20-1 depicts what a simple railway ticket (presented as a pass) looks like in Passbook on a real iOS device.

A railway ticket presented as a pass in Passbook on an iOS device

Figure 20-1. A railway ticket presented as a pass in Passbook on an iOS device

iOS apps can use the Passbook framework to interact with passes as well. Going back to the coffee shop example, the app for this coffee shop may allow the user to top up their loyalty card with cash to allow them to take advantage of other cool things that the shop has to offer, such as WiFi access across the country. So, when the user opens the app, it will detect a pass in the user’s Passbook database related to the coffee shop, allow the user to top the pass up right there on her phone, and then contact a barista to say that the pass installed on the user’s device has been topped up with cash.

Pass Kit is how Apple represents this type of transaction digitally. Apple also introduced Passbook in iOS 6. So let’s get our terminology right before we dig any deeper:

Pass Kit

The framework Apple provides to developers to ...

Get iOS 6 Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.