The feature will allow developers to test their in-app purchases for a wide range of scenarios, such as upgrades, downgrades, cancellations, introductory offers, and interrupted purchases.
The Apple sandbox environment lets you test in-app purchases on devices using product information set up in App Store Connect. You can now test upgrades, downgrades, and cancellations for subscriptions, as well as reset the introductory offer eligibility for a test account from Settings on devices running iOS 14 or later. You can also test your app’s response to interrupted purchases on devices running iOS 14 or later. And App Store Connect users with the Developer role can now create and manage sandbox tester accounts.
The enhanced sandbox environment will afford developers far greater ability to test the implementation of their purchases using Apple’s StoreKit framework in Xcode and iOS 14. Developers can now use a sandbox Apple ID to simulate all purchase situations exactly as their users will experience it.
Enhanced Sandbox Testing was first revealed at WWDC alongside other improvements to Xcode, “macOS Universal” apps, WebExtensions API support for Safari, and more transparent privacy information in the App Store.