Join Ron Buencamino for an in-depth discussion in this video Overview, part of Implementing In-App Purchases in iOS 11 with StoreKit.
- [Narrator] In-app purchases in iOS are powered by the StoreKit framework which has been around since iOS 3. StoreKit framework is a series of classes that simplify the entire in-app purchase process. Its purpose is to be your main interface with the App Store and aids and tasks such as payment processing, receipt handling and even delivery of downloadable content that you choose to host with Apple directly. In-app purchases can be performed for digital goods or services that are bought right inside of your app.
This is not meant for physical goods. Only digital goods or services. For physical goods, there are a number of alternatives that you can go for, such as Apple Pay. 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 which is also known as the freemium model. This is where a free app offers limited functionality to give users a taste of what's to come. And then if they were to opt in and buy the premium addition, they would then get the full experience.
Another scenario would be if you were to have a custom music player app and you wanted to offer your users the ability to purchase and download new music right to the player. You can offer up a list of music tracks that are available and with a few taps, have new content delivered right to your user. You can also have a news reader app that will allow a user to subscribe to your service on a monthly or an annual basis. And if you're a game developer, you can use in-app purchases to offer your player in-game bonuses, such as extra lives, power ups, additional ammo or whatever cool ability you can dream up.
Now when offering purchases, there are different types that you can incorporate within your app. You can add consumable products which are items that can be purchased and once used, a user would need to repurchase that item again. So, in other words, these products don't stick around after they're consumed. An example of a consumable product would be a power up in a video game where once a user activates it, the power lasts for a finite time and after that expires, they'll need to purchase it again at a later time.
You can also add non-consumable products which are products that can be used as many times after a user purchases it. An example would be a filter for a photo management app that a user can apply to every photo after they initially purchase it. A user would be able to restore this functionality in the future should they need to reinstall your app for whatever reason. Now you can also add subscriptions to your app and there are two types. First, there are non-renewable subscriptions which are subscriptions for a length of time that aren't meant to automatically renew once their term is up.
For example, you can offer an annual subscription to a service that requires a user to re-subscribe should they want to after their initial term is up. Now, on the other hand, you can have auto-renewing subscriptions which are subscriptions that are meant to automatically renew once their term is up. The user will stay subscribed to an auto-renewing subscription until they opt out. A good example would be a monthly subscription to a magazine or a streaming television service. Now, as of iOS 10, subscriptions have gone through a bit of a change for developers.
In the past, subscriptions were only available to apps that were within a particular category and this has changed as now subscriptions aren't category dependent, meaning that you can create a subscription purchase for almost anything. However, the products that you make available for purchase still have to undergo inspection during app review, so there's a chance that your item can get rejected if it doesn't fit the model of what a subscription can be used for. Also, more proceeds get returned to the developer.
So if your subscriber sticks around for a long time, you'll see more money in your uptick. So for the first term, the split on revenue earned between a developer and Apple is still 70/30. However, they stick around longer than their initial term that split goes to an 85/15, giving the developer an extra 10% going forward. You can also set different pricing for different regions which gives you more flexibility when you're pricing for other currencies. And, you have the ability to preserve your pricing so say for instance you start offering a subscription at one rate but down the line you want to do a price increase.
You can keep those who have already subscribed at your initial rate and offer your price increase to new subscribers after a date you choose. And lastly, the subscription UI allows a user to better manage upgrades and downgrades. So if your app offers different tiers of subscriptions, your users can better navigate through upgrading and downgrading between them without disruption to their user experience. It should also be noted that as of iOS 10, you can now build in-app purchase functionality right into your iMessage apps.
So if you choose to build an experience for iMessage extensions, you can include in-app purchases in them by utilizing the same framework that you're going to learn about here. Now new in iOS 11 is the ability to present promotions for your in-app purchases in the App Store. Now you'll be able to display any specialty you'd like to show users who are browsing the App Store and they can purchase it directly from there, without ever having to come into your app. Now with this comes a new class called SKProductStorePromotionsController and with it you can keep track of what promotions are being presented in the App Store and if a user purchases a particular promotion, you can track that and in turn, change what other promotions you'd like this targeted user to have presented to them.
Now if you're to utilize this feature, there's some observation that would need to happen in your app so that updated content can go in the right places but we'll cover more of that in technical detail later on. Also new in iOS 11 is SKStoreReviewController which is meant to provide a more streamlined way in prompting users to review your app and help gain popularity in the App Store. The interface is self-throttling and will allow you to ask for reviews up to three times for every 365 day period.
Now users can submit a rating through a standardized prompt and will be asked to authenticate to submit their review for publishing. So, from a high level, there are a few steps to take when implementing StoreKit within your project. First, you'll need to develop your app if you haven't already. Then you create your products in iTunes Connect which is where you'll go to manage all aspects of your app when it comes to in-app purchases and their availability to public. You'll then implement the StoreKit framework into your project and then you'll test and test again and again.
I can't stress the importance of testing your storefront and the entire purchasing process with a diverse set of use cases. This is your chance to interact with your user and convey trust that they'll find value in what it is you're offering to them. So make sure you get this part right. And then, once you're comfortable with how everything is working, you can then submit your app to the App Store for review to make this offering available to all of your users.
First, get an overview of StoreKit and the types of purchases you can offer, including consumable and non-consumable products and non-renewing and auto-renewable subscriptions. Next, learn how to configure new products for sale with iTunes Connect and display a storefront right within your app. Ron then shows how to request and process payments, and deliver users' purchases to their iOS devices. Plus, learn about restoring purchased content—a smart strategy for keeping your app rating high—and requesting reviews from users using the new SKStoreReviewController API, which doesn't require leaving the app.
- What is StoreKit?
- Creating products in iTunes Connect
- Displaying products in your storefront
- Requesting payments
- Receipt validation
- Delivering products
- Restoring purchased content
- Asking for app reviews