StoreKit

Generated on 8/1/2024

1 search

StoreKit at WWDC 2024

Sessions Mentioned:

  1. What’s new in StoreKit and In-App Purchase
  2. Implement App Store Offers

Key Updates and Features:

  1. StoreKit 2 Enhancements:

    • Swift Async/Await Pattern: StoreKit 2 leverages the Swift async/await pattern for tasks such as fetching product metadata, purchasing, and retrieving customer transaction history. This modern approach simplifies asynchronous programming.
    • Back Deployment: Thanks to the back-deployed attribute in Swift, StoreKit 2 features can be accessed even on devices with older operating systems.
    • Deprecation of Original API: Starting with iOS 18, the original API for in-app purchases is deprecated. Existing apps will continue to work, but no new features or enhancements will be added to the legacy API. Developers are encouraged to migrate to StoreKit 2 for a better experience.
  2. Testing Enhancements in Xcode:

    • StoreKit Testing in Xcode: New features in Xcode 16 allow for comprehensive testing of in-app purchase flows, including privacy policy and license agreement testing locally.
    • StoreKit Configuration File: Setting up a StoreKit configuration file with product metadata is essential for getting in-app purchase UI working with Xcode previews.
  3. Subscription Store View:

    • Custom Control Styles: Starting in iOS 18, developers can create custom control styles for subscription stores. This includes using the same primitives that StoreKit uses to create standard styles.
    • Subscription Promotional Offer: A new view modifier called subscriptionPromotionalOffer allows developers to show promotional offers in the UI of a subscription store view.
  4. App Store Offers:

    • Win-Back Offers: New APIs and tools to support win-back offers, which are designed to re-engage lapsed subscribers. This includes streamlined purchasing and eligibility checks.
    • Offer Discount Type: New fields in the App Store server APIs provide detailed information about offers, such as whether they are free trials, pay-as-you-go, or pay-upfront.

Relevant Timestamps:

For more detailed information, you can refer to the sessions directly: