Getting Started with Testing IAP on iOS π
Testing IAP on iOS seems simple until you actually try it. However, if you’re doing it for the first time, things like sandbox accounts, hidden settings, and Apple’s limited documentation can make the process confusing.
Therefore, this guide pulls everything together in one place based on real testing experience so you can get started quickly and avoid common mistakes.
π‘ Key Point: Sandbox purchases only work in TestFlight builds β you cannot test sandbox transactions in your live App Store app.
Furthermore, you don’t need to get your IAPs approved to test them in TestFlight β they’ll still work. However, for the same purchases to work in your live App Store app, products must be approved in App Store Connect.
What You Need for Testing IAP on iOS β
Before we begin, make sure you have the following requirements:
- Access to your app’s build via TestFlight
- In-App Purchases created in App Store Connect
- A test device (iPhone or iPad)
- Additionally, a sandbox tester account (we’ll create this in Step 1)
Step 1: Create a Sandbox Tester Account for Testing IAP on iOS π€
Sandbox testers are fake Apple IDs that simulate purchases without charging real money. Consequently, you’ll use them during IAP testing.
Here’s how to create a sandbox tester:
- First, go to App Store Connect
- Next, navigate to: Users and Access β Sandbox Testers
- Then, click “+” to add a new tester
- After that, use a real or disposable email that can receive emails
- Finally, set a password, name, and region
π Apple will send an OTP to that email. Moreover, if you use a fake address that can’t receive emails, you’ll get stuck later when trying to verify.
Step 2: Enable Developer Mode for Testing IAP on iOS βοΈ
Developer Mode is required for sandbox testing. Fortunately, enabling it is straightforward.
To enable it:
- Initially, go to: Settings β Privacy & Security
- Subsequently, scroll to the bottom and tap Developer Mode
- Then, toggle it ON
- As a result, your iPhone will restart
- Finally, after restart, confirm again by tapping Turn On
Consequently, you’ll see a new section appear: Settings β Developer
β If Developer Mode isn’t showing, check the missing developer mode section at the end of this guide.
Step 3: Add Sandbox Accountπ
Once Developer Mode is enabled, you need to link your device to the sandbox test environment.
Here’s how to do it:
- First, go to: Settings β Developer β Sandbox Account
- Next, sign in with your sandbox Apple ID and password
- Finally, enter the verification code (OTP) sent to your email
β Your iPhone is now ready to test in-app purchases using the sandbox account.
Step 4: Download App via TestFlightπ²
To begin testing IAP on iOS, you’ll need to complete two important steps:
First β Install the Test Build:
- Initially, download the TestFlight app from the App Store
- Subsequently, download your app build from TestFlight
Then β Sign Out of App Store:
- Navigate to: Settings β Apple ID β Media & Purchases β Sign Out
β This ensures that your sandbox account is used for purchases instead of your personal Apple ID.
Note: Signing out of Media & Purchases can remove your access to purchased content in production apps on your device. Therefore, consider using a dedicated testing device when testing IAP on iOS with sandbox controls.
Step 5: Make Your First Test Purchaseπ³
Now you’re ready to test real IAP flows using fake transactions.
- First, open the app you installed via TestFlight
- Next, try purchasing a subscription or in-app item
- As a result, you’ll either:
- Be prompted to enter your sandbox Apple ID and password
- Or alternatively, see Face ID confirmation if already signed in
After confirming, your app will receive a sandbox transaction receipt, just like a real purchase β but without any billing.
Step 6: Test Subscriptions and Renewals When Testing IAP on iOS π
Apple simulates faster auto-renewal cycles in the sandbox so you can test without waiting days. Consequently, this makes testing much more efficient.
To manage test subscriptions:
- First, go to: Settings β Developer β Sandbox Account
- Then, tap your sandbox email
- Finally, tap Manage to:
- View active test subscriptions
- Cancel or let them auto-renew
In sandbox mode:
- A 1-month subscription renews every 5 minutes
- Similarly, a 1-year subscription renews every 30 minutes
Perfect for testing how your app responds to renewals, cancellations, and expirations when testing IAP on iOS.
Troubleshooting Developer Mode When Testing IAP on iOS π§
If Developer Mode isn’t visible under Settings β Privacy & Security, here’s how to unlock it. Fortunately, there’s an alternative solution.
Use Tenorshare iCareFone
If you don’t have Xcode or a Mac, this is the easiest method β it works even on Windows.
Steps:
- First, download Tenorshare iCareFone on your PC or Mac
- Next, connect your iPhone via Lightning to USB
- In iCareFone:
- Click the βοΈ edit icon next to Quick Access
- Subsequently, add Developer Mode tool
- On your phone:
- Navigate to Settings β Privacy & Security
- Scroll down, find Developer Mode, and turn it ON
- As a result, your iPhone will restart and ask again to Turn On Developer Mode
- Finally, turn it on
β Once enabled, you’ll now see Settings β Developer, and you can add your sandbox account.
For additional information, please refer to: https://www.tenorshare.com/iphone-tips/enable-iphone-developer-mode.html
Final Checklist for Testing IAP on iOS β
Here’s a quick summary of the steps:
- Create a sandbox tester account
- Enable Developer Mode
- Β Add the sandbox account on your iPhone
- Β Install your app via TestFlight
- Β Sign out of Media & Purchases
- Β Make purchases and test renewals with the sandbox environment
- Β Use Manage Subscriptions to simulate cancellations
Final Thoughts π
Testing IAP on iOS can feel confusing β sandbox logins, hidden settings, and lots of little steps. This guide puts everything together in one place to make it easier.
If this guide helped you, or if you’ve found other useful tips, feel free to share them in the comments. Happy testing! π
Also, donβt miss our previous article: Inapp Purchase Subscription: From Chaos to Clarity
Leave a Reply
You must be logged in to post a comment.