> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.qonversion.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Purchases — Apple

Follow the steps below to verify your Apple App Store integration with a sandbox test purchase.

## 1. Set Up a Sandbox Test Account

1. Go to [App Store Connect](https://appstoreconnect.apple.com/) -> **Users and Access** -> **Sandbox** -> **Testers**.
2. Create a new sandbox tester account or use an existing one.

## 2. Configure Sandbox Environment

Add the sandbox environment setting to your SDK initialization to distinguish test data from production:

```swift Swift theme={null}
let config = Qonversion.Configuration(projectKey: "[projectKey]", launchMode: .subscriptionManagement)
config.setEnvironment(.sandbox) // Add this line for testing
Qonversion.initWithConfig(config)
```

```objectivec Objective-C theme={null}
QONConfiguration *configuration = [[QONConfiguration alloc] initWithProjectKey:@"[projectKey]" launchMode:QONLaunchModeSubscriptionManagement];
[configuration setEnvironment:QONEnvironmentSandbox]; // Add this line for testing
[Qonversion initWithConfig:configuration];
```

<Warning>
  Make sure to use a physical device (not a simulator) when testing iOS purchases.
</Warning>

## 3. Make a Test Purchase

1. Run your app on a physical device.
2. Sign in with the sandbox tester account on the device (**Settings** -> **App Store** -> **Sandbox Account**).
3. Trigger a purchase in your app — the App Store will process it in sandbox mode.

<Warning>
  Do not use the sandbox environment in production. Switch to the production environment before releasing your app.
</Warning>
