views:

296

answers:

4

I am trying to implement InApp purchase in my application. I have implemented it as per Apple's programming guide and it(code) was working fine until I created new application, appid, 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"

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

A: 

Hello, Were you able to resolve this issue I'm experiencing a similar problem.

Thanks

Kyle

Kyle Buttress
A: 

I had an error similar to this. The issue was 1. not having a provisioning profile setup that could handle in app purchases 2. not having created the app profile in iTunes Connect 3. not having created the in app purchase items in iTunes Connect

After I setup the above 3 things and used the new provisioning profile when signing the app I was golden.

emullet
+1  A: 

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

http://stackoverflow.com/questions/3522899/iphone-storekit-sandbox-stopped-working/3533363#3533363

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.

Mark A.
Update: Check out this post and add your complaint so apple will get a move on fixing this issue.http://stackoverflow.com/questions/3522899/iphone-storekit-sandbox-stopped-working/3533363#3533363
Mark A.