How to test subscription in TestFlight build?

Generated on 9/25/2024

1 search

To test subscriptions in a TestFlight build, you can utilize the StoreKit testing capabilities in Xcode. Here's a brief overview of the process:

  1. Set Up StoreKit Configuration: In Xcode, configure your StoreKit settings to include your in-app purchases and subscriptions. This setup allows you to simulate different subscription states and test various scenarios.

  2. Use TestFlight for Distribution: Once your app is ready, distribute it to beta testers using TestFlight. You can invite testers via email or share a public link. TestFlight supports up to 10,000 beta testers, and they will automatically receive new versions of your app.

  3. Test Subscription Offers: You can test subscription offers, including Winback offers, using StoreKit testing in Xcode. This involves setting up your subscription under the auto-renewable subscriptions heading and configuring the offers you want to test.

  4. Simulate Billing Issues: Starting with iOS 18, you can test billing issue messages directly in your app. StoreKit will prompt users to resolve billing issues, and you can simulate this in Xcode to ensure your app handles these scenarios correctly.

For more detailed guidance, you can refer to the session Implement App Store Offers (26:22) and What’s new in StoreKit and In-App Purchase (19:40) from WWDC 2024. These sessions provide insights into testing subscription offers and handling purchase intents in Xcode.