-
Notifications
You must be signed in to change notification settings - Fork 338
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
Purchase methods do not support specifying the scene they should confirm in #4774
Comments
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out! |
Note that as far as I am aware there is no workaround for this until RC adds the API. For example, I have a multi-window Catalyst app and the user can start a purchase from the Settings window, while the main window is also showing. A lot of the time this results in the purchase sheet appearing in the main window instead of in the settings window, which is unexpected and problematic. |
Hey @marcpalmer! Thank you for filing this request, this is indeed a blind spot on the SDK for apps opening multiple windows. We're working to add support for passing a UIScene so the payment sheet can be opened in the right window. |
Thanks @MarkVillacampa — is there a viable workaround to not call RC purchase calls and fetch the SK2 product and call purchase on that ourselves? Will RC do all the housekeeping properly or will we lose something? |
@MarkVillacampa sorry to bump but is there any possible workaround for now? |
Describe the bug
.with(storeKitVersion: .storeKit1)
)Probably 100%
Purchases.logLevel = .verbose
will help us debug this issue.As noted in #4611 Apple have had issues in StoreKit with changes they made to have APIs support a
confirmIn:
parameter that takes a VC or scene that should be used to present the StoreKit UIs.This is required because in modern apps multiple scenes can exist and we have to pass in the actual one we want to be handling the UI.
With SwiftUI we don't have to do this if we use Apple's modifiers for purchasing + showManagesSubscriptions etc. because they handle it internally as they know the current widow scene.
The "bug" or problem is that as a RevenueCat user I cannot do this, and RC does not offer the API for me to pass in a UIScene so that I can work it out myself and pass it in.
So I cannot work around problems where the StoreKit UI appears in the wrong window.
See #4611
Apple's docs for the new showManageSubscriptions() https://developer.apple.com/documentation/storekit/appstore/showmanagesubscriptions(in:subscriptiongroupid:)
Apples docs for the new purchase() functions
https://developer.apple.com/documentation/storekit/product/purchase(confirmin:options:)-6dj6y
We really need RC to allow us to pass in this visual context, and ideally also include its own view modifiers for purchase + showManageSubscriptions so that we don't have to do the hacky workarounds to get the UIScene ourselves.
The text was updated successfully, but these errors were encountered: