This guide covers how to set up StoreKit Testing in Xcode to test paywall displays across different regions and configurations.
StoreKit Testing allows you to test in-app purchases and paywall presentations locally without connecting to App Store servers or making real purchases.
Note - If you’ve chosen to sync your configuration file with the App Store Connect, your file will already be populated with your products. To re-sync with App Store Connect, click on the file and then Sync at the bottom-left. If you want to manually edit it, use Editor > Convert to Local StoreKit Configuration.
Use the + at the bottom-left to add a product.
Complete the form that pops up. Once created, you can edit all details of a product such as price, product ID, etc.
You can either edit an existing scheme or create a new one (recommended):
In Xcode, go to Product → Scheme → Manage Schemes…
Select your primary scheme and find the option to Duplicate:
Edit the new scheme’s name so you know it’s for StoreKit testing.
Select the Run action.
Click the Options tab.
For the StoreKit Configuration option, select a configuration file and click Close.
Run your project (make sure your active scheme is the one with the StoreKit Configuration option set!)
An Xcode project can contain multiple StoreKit configuration files but only one can be active at a time. When it’s active, your app gets StoreKit data as defined in your configuration file instead of accessing App Store Connect or the sandbox server.
Go to your StoreKit config file and under Configuration Settings, change Default Storefront:
Then run your app again, and you should be able to see pricing displays for the selected region. Note that the price numerical value will still be what is specified in the config file, but you should see a change in currency symbols.
For actual purchase flow testing, refer to Apple’s documentation on [receipt validation](https://developer.apple.com/documentation/xcode/setting-up-storekit-testing-in-xcode/#Prepare-to-validate-receipts-in-the-test-environment and the transaction manager
You can utilize StoreKit Testing in your continuous integration tests. See Apple’s documentation here and a more detailed testing overview here.