Swiftystorekit: Cannot connect to iTunes Store when purchasing

Created on 6 Jun 2018  路  23Comments  路  Source: bizz84/SwiftyStoreKit

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?

purchase flows intermediate help wanted bug

All 23 comments

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

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

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?

+1 Message "Cannot connect to iTunes Store"

@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
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....

I also faced with "Cannot connect to iTunes Store"

Hi @georgbachmann ! Did you solve this issue?

Hi @georgbachmann ! Did you solve this issue?

Hi @alexanderkhitev
You solve this issue in your app?

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

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

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

@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

I'm having the same problem

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

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 馃檲

Having the same problem periodically.

Same issue here

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

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

Same issue here

I'm so sorry to hear about this issue. Has anyone been able to consistently replicate this?

@Sam-Spencer Hi! I have strange behaviour here: there were no any issues when we test the app. But a reviewer and users have such issues. Also, I use SwiftyStoreKit in the other project and looks like it works well there.

Was this page helpful?
0 / 5 - 0 ratings