1
votes

I had configured a non-consumable product in iTunes connect and i am able to purchase and restore that product (obviously in sandbox). Initially this is all working as expected, but now when i try to restore the product, i got a call back on the failure method

- (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error

with this error description

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

I can purchase the product using the same user account but cannot restore the product after reinstalling the app. When i try to purchase the same product again i got the usual message from the Apple that i had bought this product earlier(as expected). So i think issue is related with restoring the in-app purchase module.

This Apple doc didn't help me either.

I have tried with different sandbox user accounts and all have the same issue.

Any help will be appreciated

Thanks

2
Are you on simulator or real device?garanda
Real device iPhone 6S iOS version 9.2.1Aravind Bhuvanendran
Something like that happened to me, my solution was logout from the Settings-> iTunes Store & App Store, and then click on restore purchases on my app and login from there.garanda
i tried that as well, but it didn't work for meAravind Bhuvanendran

2 Answers

3
votes

This happened to me once before, and apparently happened to other people in the past.

If you are sure that your code is correct, give it some time and try again later. It's probably not what you wanted to hear, but it happens with the In-App Purchase mechanism.

Edit: Other people are starting to report about an issue with restoring purchases in the sandbox environment, see here.

0
votes

I just wanted to confirm that I am seeing the same behaviour as of 24th March 2016 (sandbox environment). My code was verified as working; no code was changed and I am seeing the same behaviour you observe. Ergo this is a problem on Apple's side and unfortunately we just have to wait until they resolve it. It has been reported it on the Apple developer forums.

See e.g. Apple Developer Forums