Class and Code for In-App Purchases

Creating in-app purchases in iTunes Connect is just the first step in actually having in-app purchases available in your application. The next step is to understand the process of how in-app purchases are actually purchased and what classes are involved. The framework that contains the pertinent classes is called StoreKit, and is available as part of you iOS SDK installation. Using these classes, we are going to implement the workflow as shown in Figure 10–6, which shows the process of determining which products are available and how to handle the request to make a purchase.

Image

Figure 10–6. Purchase Process ...

Get Beginning iOS 5 Games Development: Using the iOS 5 SDK for iPad, iPhone, and iPod Touch now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.