SwiftyStoreKit icon indicating copy to clipboard operation
SwiftyStoreKit copied to clipboard

Completion on success purchase is not call-backed on iOS 17 simulator

Open torufuruya opened this issue 10 months ago • 5 comments

Bug Report

  • Completion is not call-backed on iOS 17 when it succeeds in purchasing an auto-renew subscription by purchaseProduct().
  • Besides, the purchase view (sheet) appears again and again and again.
  • If I close the purchase view (sheet), the completion is call-backed with the error of canceling the purchase.

To Reproduce

  1. Purchase the auto-renew product by the purchaseProduct()
  2. Sign in to the Sandbox Apple account

Expected behavior

Completion is call-backed when it succeeds in purchasing on iOS 17

Platform Information

  • OS: iOS 17
  • Purchase Type: auto-renewable subscription
  • Environment: sandbox
  • SwiftyStoreKit version: 0.16.4
  • Xcode: Version 15.0 beta 7 (15A5229h)

torufuruya avatar Aug 24 '23 23:08 torufuruya

I tried StoreKit2 to purchase the same product and it does the same as this issue (doesn't return the success result and the purchase sheet appears again), so it's most probably the Xcode beta and iOS 17 issue 😕

do {
    let products = try await Product.products(for: ["my product ID"])
    let result = try await products.first?.purchase()
    print(result)
} catch {
    print(error.localizedDescription)
}

torufuruya avatar Aug 25 '23 03:08 torufuruya

Please test with real device

monkeyRing avatar Aug 29 '23 03:08 monkeyRing

I confirmed nothing changed on Xcode 15 beta 8 (15A5229m).

@monkeyRing I don't have a device that can install iOS 17, so It would be appreciated if you could test it.

torufuruya avatar Aug 30 '23 00:08 torufuruya

I tested it with the physical device iPhone SE 3rd that iOS 17 public beta 6 installed, and the issue did not reproduce. So it is probably only the issue for iOS 17 simulators.

Feel free to close the issue in case it should be. Thanks.

torufuruya avatar Sep 07 '23 01:09 torufuruya

I ran into a similar problem and it worked fine using the real machine

800sea avatar Dec 31 '23 05:12 800sea