Join Ron Buencamino for an in-depth discussion in this video Persisting auto-renewing subscriptions, part of Implementing In-App Purchases in iOS 10 with Swift 3.
- View Offline
- [Instructor] When working…with our auto renewing subscription,…the cloud back up feature, how we persist our purchase…is going to be just a tad different.…We'll still want to unlock features using user defaults…however because subscriptions can expire…we'll need to include a way to…lock a feature back up should that occur.…Now if we remember our app store receipt…for every in app purchase item…if it's an auto renewing subscription…it also comes with a type 1708 attribute,…which is the subscription expiration date.…
We want to check the devices current date…against this attribute to see…if the description should remain active.…So I'm here in IAP Manager and I'm going to…jump down to the bottom of the class.…I'm going to create a function called lock product identifier…and this function is going to act similarly…to unlock product identifier except we're…going to set a false value for the boulean…and we're going to synchronize our user default.…So let me go ahead and do that.…
Pretty straight forward here.…Setting a false value for the boulean…
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. Plus, learn about selling subscriptions and restoring purchased content—a smart strategy for keeping your app rating high.
- What you can and can't sell in the App Store
- Looking at StoreKit
- Creating products in iTunes Connect
- Presenting products in your storefront
- Requesting payments in your app
- Processing transactions
- Delivering products
- Persisting purchases and auto-renewed subscriptions
- Restoring purchased content