In-App Purchases

Mar 19 2019 · Video Course (3 hrs, 5 mins) · Intermediate

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.

2.7/5 6 Ratings

Version

  • Swift 4, macOS 10.14, Xcode 10

Getting Started

Introduction

3:34 Free

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.

1

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

2

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

3

Creating an App

5:48 Free

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

4

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

5

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

6

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

7

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

8

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

9

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

10

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

11

Conclusion

0:42

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

12

Buying and Restoring Products

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

13

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

14

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

15

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

16

Saving Locally

6:23 Free

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

17

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

18

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

19

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

20

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

21

Conclusion

0:44

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!

22

Validating Receipts

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

23

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

24

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

25

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

26

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

27

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

28

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

29

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!

30

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

31

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

32

Conclusion

2:02

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

33

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

Contributors

Comments