Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purchases Failing in UIKit Based Apps on iOS 18.2+ #105

Open
mTuran opened this issue Jan 4, 2025 · 2 comments
Open

Purchases Failing in UIKit Based Apps on iOS 18.2+ #105

mTuran opened this issue Jan 4, 2025 · 2 comments

Comments

@mTuran
Copy link

mTuran commented Jan 4, 2025

After updating our app SDK to Adapty 3.3.1, we encountered the following error consistently with all calls to Adapty.makePurchase(product: product):

Failed to purchase product: <product_id> Request Canceled
v3.3.1, Adapty/SK2Purchaser.swift#175
Completed makePurchase(product:) [bHNHTU] with error: StoreKitManagerError.productPurchaseFailed([3.3.1]: Adapty/SK2Purchaser.swift#176, userCancelled).
v3.3.1, Adapty/Adapty+Shared.swift#66

Verbose logging provides additional context:

Could not get confirmation scene ID for <product_id> purchase

Upon investigating further, it appears that StoreKit 2 introduces new requirements for displaying a confirmation scene starting with iOS 18.2. Apple has added a new parameter, confirmIn, for these cases, which is used to specify the confirmation scene’s location: Apple StoreKit Documentation: purchase(options:)

Unfortunately, as of Adapty SDK version 3.3.1, it is not possible to pass the confirmIn parameter to meet these new requirements.

Suggested Resolution: The SDK should provide a way to specify confirmIn for StoreKit purchase calls. Please consider adding support for the confirmIn parameter.

Relevant thread from Apple dev forums: https://forums.developer.apple.com/forums/thread/768410

@artem-faceout
Copy link

Same issue for me.

Could not get confirmation scene ID for <product_id> purchase
Failed to purchase product:  <product_id> Unable to Complete Request
v3.3.1, Adapty/SK2Purchaser.swift#175
Completed makePurchase(product:) [uW1R0i] with error: StoreKitManagerError.productPurchaseFailed([3.3.1]: Adapty/SK2Purchaser.swift#176, unknown).
v3.3.1, Adapty/Adapty+Shared.swift#66

Adapty team, any updates on this? @aleksei-valiano @x401om @

@x401om
Copy link
Contributor

x401om commented Jan 7, 2025

Apple seems to have broken the purchase(options:) method for some layouts in iOS 18.2. We plan to support the new purchase(confirmIn:options:) method in future releases. As a workaround, please use modalPresentationStyle = .overFullScreen for UIKit controllers or set fullScreen: false for SwiftUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants