how to add storekit

Generated on 3/17/2025

1 search

To add StoreKit to your app, you can follow these steps based on the information from the WWDC sessions:

  1. Set Up a StoreKit Configuration File:

    • Create a StoreKit configuration file with your product metadata. This is essential for getting the in-app purchase UI working with Xcode previews. For more details, refer to the session What’s new in StoreKit and In-App Purchase.
  2. Use StoreKit APIs:

    • Utilize the StoreKit APIs to manage in-app purchases. StoreKit 2 provides a suite of tools for handling in-app purchases, including fetching product metadata, purchasing, and retrieving customer transaction history. More information can be found in the session What’s new in StoreKit and In-App Purchase.
  3. Test in Xcode:

    • Use StoreKit testing in Xcode to test your purchase flows. This includes testing your app's privacy policy and license agreement locally, as well as localizations for your subscription groups. For more details, see the session What’s new in StoreKit and In-App Purchase.
  4. Customize Subscription Store Views:

    • If you want to customize the appearance of your subscription store, you can create custom control styles. This involves declaring a type that conforms to the subscription store control style protocol and using the new subscription Picker API. More information is available in the session What’s new in StoreKit and In-App Purchase.

These steps should help you integrate StoreKit into your app effectively. For more detailed guidance, you can refer to the specific sessions mentioned above.