Overview of the In-App Purchase Process
- [Voiceover] So, you want to learn how to implement in-app purchases into the cool app that you're developing. That's great, as it provides you with a lot of growth potential for the app or service that you're launching. However, before we can dive into the details, let's get an understanding of exactly what the entire implementation of in-app purchases looks like. First and foremost, and also the obvious, in-app purchases allow users to purchase content and services directly from your app.
What this essentially means, is that you can create a store front from within your app that'll allow your users to browse through an array of products and purchase what it is they choose to. Because all in-app purchases are tied to a user's iTunes account. There's no need for you to have to collect credit card or personal information. It's all built right into the platform. Next, to set all of this up, you're going to have to define and setup your products in iTunes Connect.
This process involves determining the type of in-app purchase you want to offer as well as defining the price that you'll offer your products at. And then lastly, you're going to implement this functionality into your app using the Store Kit framework. The Store Kit framework is a series of classes that simplify the entire in-app purchase process. It handles all of the communication with the app store, payment processing, receipt handling, and even the delivery of downloadable content that you can chose to host with Apple directly.
However, and don't forget, the implementation process includes your testing procedures as well, and when it comes to in-app purchases, I can't stress the testing process enough. First impressions are everlasting and the last thing you want is a faulty roll out of your store to your users. So what are some example scenarios that you can implement in-app purchases with. Well, quite often we see the app's ability to go from a free to a premium business model.
This is also known as the freemium model. Where the free app offers a limited functionality experience to give the users a taste of what's to come, and if they were to buy into the premium edition, they'll get the full experience. Another scenario would be if you were to have a custom music player app and you wanted to offer to your users the ability to purchase and download new music right to your player. You can offer up a list of music tracks that are available and with a few taps, have new content delivered to your users.
You can also have a news reader app that'll allow users to subscribe to your news service on a monthly or annual basis, or if you're a game developer, you can use in-app purchases to offer you player in-game bonuses, like extra lives, powerups, additional ammo, or whatever cool ability you can dream up. So on a high level, when a user opts to interact with your store, the Store Kit framework handles all of this and handles the communication with the app store.
After it performs all of the functions that it needs, it returns data back to your app and ultimately to your user. Then, if necessary, you can take the returned data and sync it with your own server so that you can track additional consumption and metrics. Now, if we were to drill down into the process further, the entire in-app purchase procedure can be broken down into three stages. First, we have to retrieve product information. Our app will make a product request to the app store, which would then return the requested product information that we entered into iTunes connect.
Our app will then take the returned contents and display it in our own store UI. During the second stage, we're going to be requesting payment. What this entails is our user picking the product that they want to purchase and then our app making a payment request to the app store for this product. The third stage is the product delivery phase. This is where the app store receives our payment request, processes it, and if successful, then returns a response to an observer who's job in our app is to deliver the requested product to the user.
This is where we trigger on demand downloads, deliver one off products, or start subscriptions. So again, the process that we're going to be taking is as follows, first we'll develop a great app. Something I'm sure you're already more than capable of doing. Then, we'll create our products in iTunes Connect. Afterwards, we'll implement Store Kit and lastly, we'll test our application to ensure everything is working properly. We've already developed our app.
So this brings us to the next step in the process that we're going to discuss, which is creating your products in iTunes Connect. So let's get started.
First, learn what you can legitimately offer for sale in the App Store. Apple's guidelines restrict the sale of certain products, including real-world goods. Next, learn how to configure new products for sale with iTunes Connect and retrieve the product information in your app. Ron then shows how to request and process payments, and deliver the user's purchases to their iOS device. There are separate chapters for working with subscriptions and restoring purchased content when users have to reinstall the app—a smart strategy for keeping your app rating high.
- What you can and can't sell in the App Store
- Creating products in iTunes Connect
- Retrieving product information
- Requesting payments in your app
- Processing App Store transactions
- Delivering products to your app
- Working with subscriptions
- Restoring purchased content