In-App Purchases

Updated for 2019! In-app purchase offers additional revenue streams for developers other than the initial purchase from the App Store. This can be great for unlocking functionality, providing additional content or for in-game currency. Covering the dance with iTunes connect, integration with StoreKit, restoration of previous purchases and receipt validation, by the end of the series you’ll have a great understanding of the concepts behind IAP. By Brian Moakley.

Leave a rating/review
Save for later
Comments
Share

Who is this for?

This course is for intermediate iOS developers who are comfortable with the Swift language and know their way around Xcode.

Covered concepts

The course will teach you about:

  • defining your own in app purchases in iTunes Connect
  • preparing purchases in Xcode
  • buying and restoring purchases
  • creating subscriptions
  • how to validate receipts on a device and on a server

Part 1: Getting Started

01
Toggle description

Interested in incorporating in-app purchases into your app? This course teaches you how to do just that. Find out what's involved and what you'll learn.

Toggle description

A starter project will be used to display in-app purchases. Here, you'll get an introduction to the project itself.

Toggle description

This episode walks you through setting up an app on the Apple Developer Center to enable in-app purchases.

Toggle description

There are four types of in-app purchases. This episode details what they are and how you can use them

Toggle description

There are various types of in-app purchases that you can integrate in your app. This episodes covers all the various types.

Toggle description

Challenge time! In your first challenge, you'll finish adding all of the in-app purchases.

Toggle description

In this episode, you'll learn how to create new sandbox users to test your purchases.

Toggle description

Once you have everything set up in iTunes Connect, your next task is to configure your project to use in-app purchases.

Toggle description

With everything configured in your app, your next task is to integrate StoreKit into the app.

Toggle description

With everything in place, you'll now list all your products in a table view.

Toggle description

There are lots of things that can wrong with your in-app purchases. This episode will walk you through them.

Conclusion 0:42
Toggle description

You've gotten your products from Apple, but the fun is just beginning! Find out more in Part 2.

Part 2: Buying and Restoring Products

Toggle description

Welcome to Part 2! In this video, discover the process of buying and restoring products via in-app purchases.

Toggle description

This episode gives you an overview of transactions and how they are used by in-app purchases.

Toggle description

Okay, you've processed the transaction - now what? Your next step is to notify the user.

Toggle description

Whew! The code is all finally in place. Your challenge is to try it out on an actual device.

Toggle description

When a user purchases content, you'll want to keep track of it in a secure manner. This episode shows you how.

Toggle description

Restoring purchases is required according the HIG -- this episode shows you everything you need to do.

Toggle description

This episode covers the basics of working with non-renewing subscriptions and how to use them.

Toggle description

Now that you have the basics added, you'll learn how to provide the actual content. Let's get started!

Toggle description

Auto-renewing subscriptions are similar to non-renewing subscriptions, but with some key differences. In this episode, learn what they are.

Conclusion 0:44
Toggle description

At this point, you have a good idea on how to make and restore purchases. In Part 3, you'll learn how to validate receipts!

Part 3: Validating Receipts

Toggle description

Why take the time to validate your receipts? This episode explains the importance of taking the time to do this.

Toggle description

This episode gives you an overview of the starter project being used to validate receipts. Take a look!

Toggle description

To get started validating receipts, the first thing you need to do is load it. Let's do that now.

Toggle description

Okay, the receipt is loaded! Now, you'll compare the receipt's signature with Apple's Root Certificate.

Toggle description

Validation: success! With the receipt validated, the next step is to read the contents. This episode teaches you how.

Toggle description

Once you have the receipt contents read into memory, the next step is to decrypt and read in the in-app purchase information.

Toggle description

Before you can finish a receipt, you need to verify the device and version. Learn how to do that in this episode.

Toggle description

At long last, it's time to test the code that you just wrote by running it on a device. Let's see how it works!

Toggle description

An alternative to local receipt validation is remote server validation, which is much easier and safer than local validation.

Toggle description

You can't just add any in-app purchase; you need to follow the guidelines. This episode walks you through some of them.

Conclusion 2:02
Toggle description

Congrats on finishing the course! This episode reviews what you've learned and provides resources on where to go next.