tee
tee

Reputation: 1336

Cannot connect to iTunes Store with newly created sandbox tester

For an app that I'm making, I'm including in app purchases and when testing it in the past it always seemed to work besides this morning. I started getting the error: Cannot connect to iTunes Store. I get the error after the IAP prompts me to log in. I created a new sandbox tester and the same thing happens. I'm definitely putting in the correct username and password because when I purposely put the wrong one it tells me through a popup.

I see that its green on https://developer.apple.com/system-status/

Also, I'm testing it on a real device and I make sure that I'm logged out of iTunes before running the app. I've tried restarting my device as well.

Any idea on how I can fix this? Any help would be greatly appreciated!

Thanks in advance!

Upvotes: 5

Views: 3225

Answers (2)

MobileGeek
MobileGeek

Reputation: 2512

Apple has this poorly documented. Basically, you shouldn't log in with your sandbox user from settings. Log in when actually prompted by your test IAP.

Upvotes: 1

tee
tee

Reputation: 1336

After a lot of searching, I was able to find the answer online:

https://forums.developer.apple.com/thread/90594 It was posted by: neilc

This is what worked for me in the end:

-Create a new iTunes Sandbox user. Do NOT verify the email address.

-Sign out of the App Store on your device.

-Begin your purchase flow.

-When prompted, tap Use Existing Account.

-Login with your new Sandbox user.

-You will be prompted to log in again—DON'T! I cannot stress that enough.

-Hit Cancel.

-Background the app.

-Foreground the app.

-Begin your purchase flow again.

-This time, you will be prompted for your Sandbox user's password (the email address will be shown in the prompt).

-Enter your password.

-Continue through the In-App Purchase flow. Purchases will succeed this time around.

If you check your App Store settings on your device, you will notice the Sandbox user is logged in. DO NOT SIGN OUT or you will invalid the Sandbox user and you will have to repeat the above steps from the beginning.

Upvotes: 10

Related Questions