SwiftyStoreKit icon indicating copy to clipboard operation
SwiftyStoreKit copied to clipboard

Cannot connect to iTunes Store when purchasing

Open georgbachmann opened this issue 8 years ago • 23 comments

Platform

  • [x] iOS
  • [ ] macOS
  • [ ] tvOS

In app purchase type

  • [x] Consumable
  • [ ] Non-consumable
  • [ ] Auto-Renewable Subscription
  • [ ] Non-Renewing Subscription

Environment

  • [ ] Sandbox
  • [x] Production

Version

0.13.2

Report

Issue summary

In my new app, I see a lot of failed purchases all with the same error: Cannot connect to iTunes Store

I've read that this happens If the user cancels, receipt refresh will fail with a Cannot connect to iTunes Store error. So basically on a receipt refresh. But it happens to me when users are trying to purchase...

I only use the SwiftyStoreKit.purchaseProduct(product) method and no refresh method. Also, I have like 4 times the number of fails instead of successes. This is kind of suspicious to me...

Do others also have this high amount of fails? Or even the same error message on the fail?

georgbachmann avatar Jun 06 '18 12:06 georgbachmann

I got the same message can not connect to iTunes Connect Store with auto-renewable subscription and environment production too.

duongntb94 avatar Jun 07 '18 02:06 duongntb94

@duongntb94 did you solve your problem or do you still have it?

georgbachmann avatar Jun 07 '18 12:06 georgbachmann

I have the same message "Cannot connect to iTunes Store" if I modify the Subscription. If I make a new purchase, it's working fine.... Is there a solution for it? Can anyone suggest me a better library?

iamimsh avatar Jun 07 '18 13:06 iamimsh

+1 Message "Cannot connect to iTunes Store"

sergey-zhuravel avatar Jun 07 '18 15:06 sergey-zhuravel

@iamimsh what do you mean with "modify the subscription"? So... is this Cannot connect to iTunes Store a bug in SwiftyStoreKit? I mean... >3k stars... I guess this lib is used quite often? Don't others have the same problem?

georgbachmann avatar Jun 07 '18 19:06 georgbachmann

@georgbachmann I mean, let's say I'm already subscribed to a weekly subscription, and I wish to change to monthly subscription... so when I do it... it says "Cannot connect to iTunes Store" !!!

3k stars and I'm surprised too... coz apple responses "You're all set" when I modify the subscription.... but SwiftyStoreKit doesn't trigger the success function instead it calls error with case unknown....

iamimsh avatar Jun 12 '18 08:06 iamimsh

I also faced with "Cannot connect to iTunes Store"

alexanderkhitev avatar Aug 03 '18 13:08 alexanderkhitev

Hi @georgbachmann ! Did you solve this issue?

alexanderkhitev avatar Aug 05 '18 09:08 alexanderkhitev

Hi @georgbachmann ! Did you solve this issue?

Hi @alexanderkhitev You solve this issue in your app?

artem-boiko avatar Oct 19 '18 12:10 artem-boiko

HI @BoikoArtem30091994 Yes, we rewrite all IAP code to Pure StoreKit

alexanderkhitev avatar Oct 19 '18 12:10 alexanderkhitev

I am not sure, but I think this error also happens if the user cancels out of the purchase. But not 100% sure...

georgbachmann avatar Oct 19 '18 12:10 georgbachmann

@alexanderkhitev thanks for your answer. But can you say how you verify receipt with pure store kit ?

artem-boiko avatar Oct 19 '18 12:10 artem-boiko

@BoikoArtem30091994 there are only three variants to verify receipts:

  • in-device validation with OpenSSL
  • remote validation with App Store (like this library do)
  • on your back-end

AppleFlash avatar Oct 31 '18 05:10 AppleFlash

I'm having the same problem

HussamEllden avatar Mar 14 '19 10:03 HussamEllden

@BoikoArtem30091994 sorry for late response. We don't need to verify receipts

alexanderkhitev avatar Mar 14 '19 15:03 alexanderkhitev

I also see this issue. Started happening without any code changes. So I assume something changed on Apples side. Now we have to deal with it 🙈

funkenstrahlen avatar Mar 17 '19 07:03 funkenstrahlen

Having the same problem periodically.

aneeshjoshi avatar Apr 29 '19 01:04 aneeshjoshi

Same issue here

dachev avatar Nov 12 '19 16:11 dachev

Having the same problem. User purchased succeed and our server also got the notification, but SwityStoreKit returns "Cannot connect to iTunes Store" error.

diov avatar Nov 13 '19 03:11 diov

Recently we are facing the same issue. No code change but started getting this error while trying to purchase auto renewable subscription? Any updates?

aipxperts-developer avatar Nov 29 '19 10:11 aipxperts-developer