Join Ron Buencamino for an in-depth discussion in this video Implementing SKProductsRequestDelegate, part of Implementing In-App Purchases in iOS 11 with StoreKit.
- [Instructor] So we're here in our Pixelford project…and I want to immediately jump into IAPManager.swift.…Before we get started, what I want to do is perform a check…on the user's device to make sure that it's capable…of performing any kind of request with StoreKit…and making in-app purchases.…What I want to do is flesh out this setupPurchases…to return.response.…What I'm doing here on line 20 is…I'm simply asking SKPaymentQueue if it can make payments,…and that's what's going to perform a check on the device…to see if we can in fact use this functionality.…
If it returns true, I call the completion handler…and return true.…If it doesn't, then on line 25 I call the completion handler…and return false.…We're going to add more functionality to this later on,…but, for now, this is the base usage of this…so that we can get going.…Now, the first big task at hand…is to request a list of products…that are currently available for our app from the App Store.…To do that, we're going to need to create an SKProductRequest…
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