Objective-c – Error Domain=SKErrorDomain Code=3 UserInfo=0x2a5a00 “Cannot connect to iTunes Store”

in-app-purchaseiphoneobjective c

I am trying to implement in-app purchases in my application.
I have implemented it as per Apple's Programming Guide and the code was working fine until I created a new application, App ID, provisioning profile and in-app products @ another developer account. Now, it gives me following error.

Error Domain=SKErrorDomain Code=3 UserInfo=0x2a5a00 "Cannot connect to iTunes Store"

The same code works fine if I use previous developer account's appid, pro-certificate and product ids.
This is a very strange issue, I double checked product id names and other things still facing same error.
Any clue..?

Best Answer

Update: Check out this post and add your complaint so apple will get a move on fixing this issue.

iPhone storekit sandbox stopped working

Close to the same thing here - Using iPad

I had my inApp purchase working. It was fine, did everything it was supposed to. Then I started getting the Error Domain=SKErrorDomain Code=2 UserInfo=(someHexMemoryAddress) "Cannot connect to iTunes Store"

Read on one post to reset all content and settings -- Did that and didn't work.

Tried creating a new Test User in iTunes -- Didn't work.

Made sure my Code Signing Identity in the Project Build Settings was set to the correct Profile that was created with all the inApp stuff. It actually wasn't, and was somehow set to any compatible Profile. I changed it to the correct profile. This didn't work either though.

Still having the same problem.

Between the time it was working and then not working, the only thing I really did was implement Facebook Connect. One interesting thing there is the delegate method -

  • (void)request:(FBRequest*)request didFailWithError:(NSError*)error;

which also gets called as a delegate method to SKRequestDelegate. I don't think this is causing a conflict because it is only getting called when there is an error.

I am still able to contact the store and get a list of available products. When I send a purchase request I get a response telling me- You've already purchased this In App purchase but it hasn't been downloaded. I click ok and then I get the Error Domain=bla bla bla .

Interestingly, I did get the dialog about previous purchase even when purchasing the item for the first time with the new test user I created.

Another thing I learned is this, IF you made the Test User, and then Signed In in the Settings App, and it asked you for a credit card, it wont work.

You need to - 1. create a new Test User, 2. sign out of all accounts in the Store settings. 3. Then go make make a purchase IN your app and it will ask you to log in with existing user. 4. Log in with the new Test User you created and it will work.

Related Topic