Reputation: 109
I'm working on In-App purchases to my iPad app. I am able to receive the productsRequest:didReceiveResponse
method, and receive the array of products.
My problem arises when I add a SKPayment to the SKPaymentQueue. After I add the product to the queue, in the paymentQueue:updatedTransactions
method the transactions always have the state SKPaymentTransactionStateFailed.
I NSLog the transaction.error
and this is what it returns:
Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo=0x339120 {NSLocalizedDescription=Cannot connect to iTunes Store}.
And also i am not able to add any new test user in Manage User.
Any solution is most welcome. Thanks
Upvotes: 4
Views: 5903
Reputation: 1600
In addition to the above answers, make sure you run on a device and not on the simulator. That solved the issue for me.
Upvotes: 1
Reputation: 2464
This problem may also occur if your app is in Sandbox and your AppStore account isn't valid for Sandbox environment. In my case I was logged into AppStore with my private account and each time I tried to make purchase I got the same error as you.
So solution is:
Upvotes: 6