23.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 23-1 depicts what a simple railway ticket (presented as a pass) looks like in Passbook on a real 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 him to top up his loyalty card with cash to allow him 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 his Passbook database related to the coffee shop, allow the user to top the pass up right there on his phone, and then contact a barista to say that the pass installed on the device has been topped up with cash.

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

Pass Kit

The framework Apple provides to developers to allow digitally signed passes to be delivered to compatible iOS devices running iOS 6 or later.

Passbook

The client application on iOS 7 devices able to store, handle, and manage passes created by developers.

Figure 23-1. A railway ticket presented ...

Get iOS 7 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.