Chapter 18. In-app purchasing using Store Kit

 

This chapter covers

  • Setting up a sandbox testing environment
  • Creating a simple store

This chapter will be structured a little differently than ones prior. Rather than going over the Store Kit API, we’ll demonstrate the topics for creating an in-app store by walking through a basic example. We’ll look at how to set up a sandbox testing environment (to mimic selling actual items) and work through how to build the store interface.

The Store Kit API allows you to sell various items within your application. The items sold are called products. These products may be virtual goods, services, or even subscriptions. All transactions are processed securely through iTunes without the user ever having to enter their payment information on the device. There are countless ways to add a store to your application, and how you do so depends entirely on your needs. In this chapter, we’ll discuss one of those ways and give you the tools to implement your own store.

The example store you’ll be creating will let users purchase iPhone backgrounds on their phone. Users will browse through the available products and purchase the ones they want to keep. When a background has been purchased, it will be saved to the user’s camera roll so the user can use it on their device.

18.1. Setting up a sandbox testing environment

18.2. Creating a simple store interface

18.3. Summary