Sandbox keeps asking you to sign in, or there's no Sandbox Account in Settings
If iOS keeps asking a sandbox tester to sign in, or Settings → Developer has no Sandbox Apple Account, the device usually isn't set up for sandbox testing yet. Turn on Developer Mode, install a development-signed build from Xcode, and start one purchase. iOS asks for the sandbox account then and keeps it under Settings → Developer. If it still loops, sign out there, create a fresh tester in App Store Connect, and sign in again.
Symptom
- Every purchase shows a “Sign in to Apple Account” prompt, even right after signing in.
- Settings → Developer has no Sandbox Apple Account section, or there's no Developer menu at all.
- The sandbox sign-in succeeds, then the purchase fails or asks again.
- The purchase sheet doesn't show
[Environment: Sandbox].
Why it happens
| Cause | How to tell |
|---|---|
| Developer Mode is off | Settings → Privacy & Security → Developer Mode is off, and there's no Developer menu |
| No purchase has been attempted from a development build yet | The Sandbox Apple Account section only appears after the first sandbox purchase attempt |
| The build isn't development-signed (App Store, or ad hoc from another team) | It was installed some other way than from Xcode |
| The sandbox account belongs to another developer account | The tester was created in a different App Store Connect team |
| A broken tester (unverified, or region and password state) | It loops for one tester and works for a new one |
| Testing a TestFlight build with a sandbox account | TestFlight uses your own Apple Account, so sandbox settings don't apply |
Confirm it
- Check Settings → Privacy & Security → Developer Mode is on. The phone restarts when you turn it on.
- Run the app from Xcode onto the device and start a purchase. The sheet should show
[Environment: Sandbox]. If it doesn't, the build isn't using the sandbox. - Open Settings → Developer → Sandbox Apple Account and note which account is signed in.
- In App Store Connect, open Users and Access → Sandbox and check that the tester exists in the team that owns the app.
Fix
- Turn on Developer Mode and restart.
- Install from Xcode (development signing) and tap Buy. Sign in with the sandbox tester when asked. iOS saves it under Settings → Developer.
- If it loops: in Settings → Developer → Sandbox Apple Account, sign out. Create a new tester in Users and Access → Sandbox in the right team, then sign in with it from a purchase.
- TestFlight: don't use a sandbox account. Install from TestFlight with your normal Apple Account. Purchases go through the sandbox and aren't charged.
- Still asking at every purchase: delete the app, restart the phone, reinstall from Xcode, and try once more with the new tester.
Stop it coming back
- Keep a short list of working sandbox testers per team, and note which phone uses which.
- Create new testers when one starts misbehaving, instead of debugging the old one.
- Look for
[Environment: Sandbox]on the sheet before every test purchase, so you know which store you're talking to.
If you use BillDog
BillDog doesn't change how iOS signs in to the sandbox. Sandbox and TestFlight purchases reach BillDog as sandbox transactions, flagged as sandbox in the dashboard. Also save the Sandbox Server URL in App Store Connect, so sandbox renewals and refunds are reported too. See App Store Connect setup. The steps on this page come from Apple's documentation and haven't yet been run on a device for this page.
Related
Sources
Did this fix it?
Frequently asked questions
Do I need to sign out of my real Apple Account to test?
No. On a development build, iOS asks for the sandbox account at the first purchase and keeps it separately under Settings → Developer. Your real Apple Account stays signed in for everything else.
Does TestFlight need a sandbox account?
No. TestFlight builds use the sandbox automatically with the Apple Account already on the device, and purchases aren't charged. Sandbox accounts are for builds you install from Xcode.
Why can't my sandbox account buy in my colleague's app?
A sandbox account only works with apps from the developer account that created it. Create testers in the App Store Connect account that owns the app.