Reputation: 21
Recently, my devices throw an error "Cannot connect to the Store" when I attempt to make an in app purchase. Note that the error doesn't say "iTunes store" or "App store". This was working two days ago, no code has changed. The only thing I have fiddled with is scheme settings and build settings. The error arose after I started archiving and building for release. I do not recall every change I made and am really asking if there is any scheme settings that would cause this issue.
What I have tried:
A different device. (Same error, two different devices, on different test user accounts)
A different account/test user.
Not logged in when making the purchase.
Note: The simulator gets passed this error but I need to test this on a device before I publish to the app store. I can navigate the store just fine with both test user accounts.
Upvotes: 2
Views: 1444
Reputation: 11537
You can't test in-app purchase in a simulator: see in the first note of this page.
I think the problem you are facing is not due to your program if it was working previously: the sandbox server used to simulate in-app purchase with your tester account might just be down: in a sandbox environment you don't test your purchase with the real in-app purchase server.
Note that as you certainly have a class that conform to the SKProductsRequestDelegate
. You can implement the request:didFailWithError:
to get a notification when you fail to get the product info list.
Upvotes: 1