Join Ron Buencamino for an in-depth discussion in this video StoreKit overview, part of Implementing In-App Purchases in iOS 11 with StoreKit.
- [Instructor] With StoreKit, you should first…familiarize yourself with SKPaymentQueue.…This is a queue of all payment-related processes…being handled by StoreKit and the App Store.…You'll need to grab a pointer to the default payment queue…on the device when you're starting your app,…which you should do by calling SKPaymentQueue.default.…To receive callbacks, you'll need to implement…the SKPaymentQueueDelegate protocol.…SKPaymentQueueDelegate protocol has a callback name,…paymentQueue:updatedTransactions,…which is called whenever a change…in a transaction status occurs.…
Now, the difference states that you're going to…have are purchasing, deferred,…failed, purchased, and restored.…The important one we're going to be looking at is purchased,…which is called when a transaction is completed.…However, another important one is deferred, which is…triggered when the ask to buy feature is implemented.…This is the case where parental controls…on an iTunes family account is in place…and a user is awaiting approval…before a purchase can be completed.…
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