restoreCompletedTransactions returns Cannot connect to iTunes Store

I can succesfully process both an SKProductRequest and an SKPayment.


However, currently, any requests to restoreCompletedTransactions results in the following error;


Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}


This doesn't seem to be related to Cannot connect to iTunes Store in the FAQbecause the product request and payments are working. If I break those FAQ points, like removing Build Version then the product request and payment fail also.


Any ideas on why this is happening?

Accepted Reply

Yup. The restoreCompletedTransactions system in the sandbox is screwed up at this moment

Replies

You are saying a payment results in a return call to updatedTransactions but a restoreCompletedTransactions does not - correct? If so, check your code - that is very unusual.

The call to restoreCompletedTransactions results in a call to paymentQueue:restoreCompletedTransactionsFailedWithError.


The code is literally just SKPaymentQueue.defaultQueue().restoreCompletedTransactions() and then it hits the method above.


So then I have to buy the product, and it just pops up with the sandbox confirmation for buying, and then displays a "you've already bought it so you get it for free" message and the payment "succeeds".

I can confirm that I am also seeing this behaviour on the sandbox for an as-yet unreleased app.


Everything has been working normally, but as of today (when I first noticed) all calls to [paymentQueue restoreCompletedTransactions] result in a call to paymentQueue:restoreCompletedTransactionsFailedWithError.


Note that no code has changed, and our code has previously been verified as working, therefore the issue is on Apple's side. Transactions initiated through addPayment proceed as normal, even if the product has been previously purchased.

Yup. The restoreCompletedTransactions system in the sandbox is screwed up at this moment

same problem here


restoreCompletedTransactions is not working