If you’d like to learn more about the topics mentioned here, check out the session “Meet StoreKit 2”. I really like these new StoreKit APIs, and I think they will enable a much richer shopping experience in apps going forward. There are many things that I didn’t cover in this article, such as new ways to check for subscription statuses and how purchases are now synced across devices automatically. This won’t refund the user immediately, but it will at least show an interface where they can ask Apple for the refund, which should be processed within a couple of business days.Īs of the publishing of this article, this API doesn’t seem to be working yet, because it requires a server-side update from Apple. Print( "Refund request failed to start: \(error) ") Maybe show something in the UI indicating that the refund is processing setRefundingStatus(on: default: This can be done quite simply by using the request method that’s available on the new Product struct: func fetchProducts() async throws -> The first step that’s required before a user can purchase anything is to fetch the app’s products from StoreKit. After creating the file, you can enable it in Product > Scheme > Edit Scheme, in the “Options” tab. Having a StoreKit configuration file in the project means that we can try out the entire in-app purchasing experience without having to configure anything in App Store Connect. Just add a new file to your project, choose the “StoreKit Configuration” option, and add a non-consumable product. If you’d like to follow along with the examples in this post, then you can set up a StoreKit configuration file in your Xcode project (a feature that was introduced last year). This new version brings the ability to verify purchases on-device with very minimal code, full async/await compatibility, and much more. This year, Apple is introducing StoreKit 2. While that approach has some advantages - like preventing a single vulnerability from enabling bypassing of in-app purchases in every app - for the vast majority of use cases, simple on-device verification of purchases is enough. Since the introduction of in-app purchases, they’ve been handled through the StoreKit framework, a highly asynchronous, delegate-based API written back in the Objective-C days.Īdditionally, the actual verification of transactions and unlocking of paid content or features has always been the responsibility of each individual app developer. These new features are part of iOS 15, iPadOS 15, tvOS 15, and watchOS 8, meaning they are available for developers to take advantage of now.Offering in-app purchases is one of the main ways through which apps can make money in the App Store. Lastly, App Store server notifications let developers get subscription expiration, offer redemption, and refund notifications. Much of the buzz at WWDC2020 was given over to SwiftUI 2.0 and ARKit, so you should forgive yourself for missing a seismic change to the StoreKit framework a change that will make your life as an app developer far easier. Developers can see a history of a user’s in-app purchases and see the status of their subscription. Users will love that StoreKit 2 allows them to easily request refunds and manage their individual app subscriptions.Īpple’s new App Store server API helps developers resolve purchase issues. StoreKit 2 also makes purchases more secure by cryptographically signing them. StoreKit 2 uses the latest enhancements to the Swift programming language and introduces new APIs that ensure developers get the most up-to-date information about their app. Apple has also updated the App Store Server API and added real-time notifications for developers to see purchases as they happen. StoreKit 2 improves the way in-app purchases and subscriptions work in apps. Apple has reminded developers that StoreKit 2 is now available as part of iOS 15 and the other newly updated Apple platforms.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |