whats the difference between storekit 1 and storekit 2

Generated on 7/30/2024

1 search

Tailscan

This post is brought to you by Tailscan, the best devtool for Tailwind CSS.

StoreKit 2 offers several improvements over the original StoreKit API (StoreKit 1). Here are the key differences:

  1. Modern Language Features: StoreKit 2 uses modern Swift language features like the async/await pattern, which simplifies tasks such as fetching product metadata, purchasing, and retrieving customer transaction history.

  2. Customer Transaction History: StoreKit 2 provides continuous access to customer transaction history and subscription renewal information, which is always available to your app.

  3. Cryptographic Validation: StoreKit 2 automatically performs cryptographic validation for you, enhancing security and reducing the need for manual validation.

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

  5. Deprecation of StoreKit 1: Starting with iOS 18, the original StoreKit API is deprecated, meaning it will not receive any enhancements or new features in future operating system releases. Existing apps using StoreKit 1 will continue to work, but developers are strongly recommended to update to StoreKit 2 to provide the best in-app purchase experience.

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