O'Reilly logo

iOS 6 Programming Cookbook by Vandad Nahavandipoor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required