Skip to main content

Using a StoreKit Configuration File with Qonversion

StoreKit configuration files in Xcode let you test in-app purchases locally without connecting to App Store servers. By combining them with Qonversion, you can validate and test the entire purchase flow in your app. Official Apple guide: Setting up StoreKit testing in Xcode Official Apple guide: Setting up StoreKit testing in Xcode

1. Create a StoreKit configuration file

  1. Open your project in Xcode.
  2. Go to File → New → File from template, search for StoreKit, and choose StoreKit Configuration File.
  3. Save the file.
  4. Inside the .storekit file, add the in-app products you want to test (consumables, non-consumables, auto-renewable subscriptions, etc.).
  5. Attach the .storekit file to your run scheme:
    • Product → Scheme → Edit Scheme… → Run/Debug → Options → StoreKit Configuration
    • Select your .storekit file.

2. Export the public certificate

Qonversion needs the public certificate from your StoreKit configuration file to validate transactions.
  1. In Xcode’s Project navigator, select the .storekit file.
  2. From the menu bar, choose Editor → Save Public Certificate.
  3. Save the .cer file locally.

3. Upload the certificate to Qonversion Dashboard

  1. Log in to your Qonversion Dashboard.
  2. Open your project settings and navigate to the section Apple App Store → StoreKit Test Certificate.
  3. Upload the .cer file you saved in the previous step.
  4. Save your changes.

4. Start testing purchases

  • Run your app in Simulator or on a device using the scheme with your StoreKit configuration file.
  • Make purchases in the app as you normally would.
  • Qonversion will handle transaction validation using your uploaded certificate, so your local test purchases behave just like real ones.