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.