Sandbox Entitlements Persist After Reset
Why Apple sandbox entitlements remain active after clearing purchase history and reinstalling, and how to work around this limitation.
When testing subscriptions using Apple's Sandbox environment (via TestFlight or Xcode), you may find that entitlements persist even after taking all the typical reset steps:
- Clearing purchase history from the Sandbox Apple ID
- Removing and re-adding the Sandbox account
- Deleting and reinstalling the app
- Calling
Superwall.shared.reset() - Restarting the device
This is expected behavior caused by how Apple's sandbox infrastructure caches subscription state. It is not a Superwall issue.
Why this happens
Apple's sandbox environment maintains entitlement state at the server level, not just on the device. Even when you clear local data and purchase history, the sandbox server may still report the subscription as active. This state can persist for an unpredictable amount of time.
The Superwall.shared.reset() method clears Superwall-specific data (user ID, paywall assignments, and cached data), but it cannot clear Apple's StoreKit entitlement state because that state is managed entirely by Apple's systems.
The solution: Use fresh sandbox accounts
The most reliable way to test a clean subscription flow is to use a new sandbox account for each test. Apple allows up to 10,000 sandbox test accounts per developer account, so you can create them freely.
Quick tip for creating multiple accounts:
Sandbox accounts do not require email verification. Use email aliases with the + syntax to create multiple accounts from a single email address:
youremail+test1@gmail.comyouremail+test2@gmail.comyouremail+test3@gmail.com
Each alias creates a distinct sandbox account while all emails still arrive at your main inbox.
When you need a guaranteed clean slate for testing subscriptions, always use a fresh sandbox account.
How is this guide?
Edit on GitHub