Storekit 2

Generated on 8/6/2024

3 searches

StoreKit 2 introduces several new features and improvements for handling in-app purchases. Here are some key points:

  1. Core API Enhancements:

    • StoreKit 2 uses modern language features like the Swift Async/Await pattern to perform tasks such as fetching product metadata, purchasing, and retrieving customer transaction history.
    • The transaction history APIs now include finished transactions for consumables, starting from iOS 18.
    • The original API for in-app purchases is deprecated starting with iOS 18, and developers are encouraged to update their apps to use StoreKit 2 for better performance and new features.
  2. Merchandising Using SwiftUI:

    • StoreKit 2 provides tools to easily merchandise in-app purchases, including new features for the subscription store view.
    • Developers can create custom control styles for subscription stores, using the same primitives that StoreKit uses to create standard styles.
  3. Testing in Xcode:

    • StoreKit testing in Xcode has been enhanced to make testing in-app purchase flows easier. Developers can now test privacy policies and license agreements locally using the StoreKit configuration in Xcode 16.
  4. Updates to Offers:

    • New view modifiers like subscriptionPromotionalOffer allow developers to show promotional offers in the UI of a subscription store view.
    • The StoreKit Message API can be used to show win-back offers to customers, providing options to build great merchandising UI and display subscription details along with any offers.

For more detailed information, you can refer to the following sessions from WWDC 2024:

Session Chapter Markers

What’s new in StoreKit and In-App Purchase

  1. Introduction
  2. Core API enhancements
  3. Merchandise using SwiftUI
  4. Test in Xcode
  5. Update to StoreKit 2

Implement App Store Offers

  1. Introduction
  2. Updates to offers
  3. Introducing win-back offers
  4. Configure win-back offers
  5. Support win-back offers
  6. Streamlined purchasing