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 Xcode1. Create a StoreKit configuration file
- Open your project in Xcode.
- Go to File → New → File from template, search for StoreKit, and choose StoreKit Configuration File.
- Save the file.
- Inside the
.storekitfile, add the in-app products you want to test (consumables, non-consumables, auto-renewable subscriptions, etc.). - Attach the
.storekitfile to your run scheme:- Product → Scheme → Edit Scheme… → Run/Debug → Options → StoreKit Configuration
- Select your
.storekitfile.
2. Export the public certificate
Qonversion needs the public certificate from your StoreKit configuration file to validate transactions.- In Xcode’s Project navigator, select the
.storekitfile. - From the menu bar, choose Editor → Save Public Certificate.
- Save the
.cerfile locally.
3. Upload the certificate to Qonversion Dashboard
- Log in to your Qonversion Dashboard.
- Open your project settings and navigate to the section Apple App Store → StoreKit Test Certificate.
- Upload the
.cerfile you saved in the previous step. - 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.