Home > AI > IOS > StoreKit >

StoreKit Testing in Xcode

Create a StoreKit Configuration File

StoreKit testing in Xcode is a local test environment where you test in-app purchases without needing to connect to App Store servers. You set up in-app purchases in a StoreKit configuration file that you add to your Xcode project. Once you enable the configuration file, the test environment uses this local data when your app calls StoreKit APIs.

The relationship between StoreKit configuration file and App Store Connect: Independent

Enter the information in your StoreKit configuration file manually. The product names, IDs, prices, localizations, and any other data you provide in the StoreKit configuration file are never uploaded to App Store Connect, and won’t appear in App Store-signed apps. Likewise, App Store Connect data is never transferred to the StoreKit configuration file.

Enable StoreKit Testing in Xcode

To enable StoreKit testing in Xcode, your project must have an active StoreKit configuration file. By default, StoreKit testing in Xcode is disabled. To select a configuration file and make it active:

  1. Click the scheme to open the scheme menu; choose Edit Scheme.
  2. In the scheme editor, choose the Run action.
  3. Click Options in the action settings.
  4. For the StoreKit Configuration option, select a configuration file.

You can also add an existing StoreKit configuration file to the project from this menu. Choose a configuration file with a .storekit file extension.

An Xcode project can contain multiple StoreKit configuration files, but only one can be active at a given time. Once it’s active, build and run your app as usual. Instead of accessing App Store Connect or the sandbox server, your app gets StoreKit data from the test environment.

Disable StoreKit Testing in Xcode

change the scheme position to None.

Leave a Reply