Cannot connect to iTunes Store in-app purchases
Make sure you have signed out of any production iTunes accounts on the device.
I was getting this error on my test phone which was logged in with my actual iTunes account. You cannot test apps using your production iTunes account, hence the error. I just wish Apple provided a better error so as to avoid this guesswork...
iPhone Store Kit Cannot connect to iTunes Store
I assume you've done the standard sanity checks: double-checking your code, confirming your product IDs, comparing your code to the In-App Purchase Programming Guide, etc.
This may be ridiculous, but -- if you're certain your code is correct -- do a hard reset (full wipe) of your iPod (Settings => General => Reset => Erase All Content and Settings). I puzzled over this exact problem for hours -- it turned out my code was correct and the hard reset was the solution.
Cannot connect to iTunes Store with newly created sandbox tester
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.
Related Topics
Setneedslayout and Setneedsdisplay
Getting Text from Image on iOS (Image Processing)
How to Display an Image Using Url
How to Add Iphonex Launch Image
Swift Merge Audio and Video Files into One Video
"Your Binary Is Not Optimized for iPhone 5" (Itms-90096) When Submitting
Initializer Does Not Override a Designated Initializer from Its Superclass
Determine If iOS Device Is 32- or 64-Bit
Detecting Touches on Mkoverlay in iOS7 (Mkoverlayrenderer)
Add Uipickerview in Uiactionsheet from iOS 8 Not Working
iOS - Delayed "Touch Down" Event for Uibutton in Uitableviewcell
Tap on a Part of Text of Uilabel
Difference Between Presentviewcontroller and Uinavigationcontroller
Setting Scroll Position in Uitableview
Firebase .Indexon Dynamic Keys
Recursivedescription Method in Swift
How to Disable No Inverse Relationship Warning for Coredata in Xcode 4.2