What is storekit2.0

Generated on 8/2/2024

1 search

StoreKit 2.0 is an updated framework for handling in-app purchases in iOS apps. It offers several improvements over the original StoreKit API, including:

  1. Modern Language Features: StoreKit 2.0 uses the Swift Async/Await pattern to perform tasks like fetching product metadata, purchasing, and retrieving customer transaction history, making the code more readable and easier to manage.

  2. Enhanced Transaction History: The transaction history APIs now include finished transactions for consumables, which were not accessible through the original APIs.

  3. Automatic Cryptographic Validation: The framework automatically performs cryptographic validation for transactions, enhancing security.

  4. Back Deployment: Thanks to the back-deployed attribute in Swift, StoreKit 2.0 allows access to new App Store features even when the app is installed on a device with an older operating system.

  5. Improved Testing: StoreKit 2.0 includes enhancements to the testing experience in Xcode, allowing developers to test in-app purchase flows more effectively.

For more detailed information, you can refer to the session What’s new in StoreKit and In-App Purchase.

Relevant Sessions