A Complete Guide to Test iOS Subscription
Many applications need users to pay a membership fee in order to access premium features. It is critical to test App Store subscriptions, but it is also difficult to do it properly. Apple's subscription documentation is difficult to understand, and Apple has never been good at providing resources.
In this article, we will go over the entire subscription testing process.
Types of Subscription Testing?
There are three types of subscription testing.
??I. Sandbox testing
?II. TestFlight testing
III. Production testing
Set Up A Sandbox AccountTo begin any form of subscription testing, you must first create a Sandbox tester account:
1. Sign in to your App Store Connect account and navigate to?Users and Access ? Sandbox ?Testers to add new testers.
2. Navigate to?Settings? App Store? Login to your Sandbox Account on your device.
Do not sign in to the production environment with your test user account. If you do this, the sandbox account becomes invalid and cannot be used any longer.
I. Sandbox Testing:
The first line of security is the developer sandbox. To save time when moving on to production testing, make sure you understand the constraints throughout development.
The Sandbox environment allows you to test?in-app subscription?transactions without actually establishing them. It simulates all subscription purchases by utilizing the Apple Store architecture. Sandbox can return a transaction as though it were processed.
Sandbox testing is divided into two types:
If you launch your app from Xcode, subscription testing takes place in the development sandbox. Subscription testing takes place on the production sandbox if your app was released using TestFlight.
Note: Subscription duration has been decreased to allow developers to test many purchases, renewals, and expirations.
To begin testing, go to?iOS Settings > iTunes & App Store and sign in to your Sandbox account.
Let's have a look at how to test a subscription purchase, auto-renewal, restoration, and expiration.
1. Run Subscription Purchase, Auto-Renewal, and Expiration tests.
??Assume your subscription is a one-year auto-renewable one:
领英推荐
2. For an active subscription, try restoring the purchase.
One significant disadvantage of the sandbox environment is that no receipt file is created on the device until a subscription is purchased, but in the production environment, a receipt file is created as soon as the app is loaded on the device.
3. Test with restoring purchases across multiple devices:
4. Test for upgrades and downgrades:
Since the sandbox environment lacks a subscription management UI, you'll need to provide buttons or other mechanisms within the app to test purchases that trigger upgrades, downgrades, and cross grades.
II. TestFlight Testing:
TestFlight operates similarly to the sandbox, but with production App Store accounts.
Since TestFlight applications use the production Sandbox environment by default, all testing stages will be the same as in the development Sandbox environment.
III. Production Testing:
There are a few ways for testing in production before a version hits the App Store, but you should also maintain testing live on the App Store whenever the app is updated.
Getting an early version of an app approved is a good way to test subscriptions for an app that has yet to be published on the App Store.
Production Testing Prior to Launch
Testing Cancelations and Refunds
As cancelations cannot be tested in sandbox environments, they must be tested in production.
Testing cancelations:
Testing refunds:
Conclusion
Testing iOS applications?could be a difficult undertaking. This article should have given you an overall good picture of iOS application testing.
However, choosing the proper strategy, the best possible testing methodology, techniques, and so on will ensure the success of the app.
Créateur d'applications iOS
1 年You are right: it can be difficult to test subscriptions... and scary if something goes wrong in production!