You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StoreKit 1 (default on versions <5.0.0. Can be enabled in versions >=5.0.0 with .with(storeKitVersion: .storeKit1))
StoreKit 2 (default on versions >=5.0.0)
OS version: iOS 18.x, Catalyst 15.x
Xcode version: 16.2+
Device and/or simulator:
Device
Simulator
Environment:
Sandbox
TestFlight
Production
How widespread is the issue. Percentage of devices affected.
Probably 100%
Debug logs that reproduce the issue. Complete logs with Purchases.logLevel = .verbose will help us debug this issue.
N/A
Steps to reproduce, with a description of expected vs. actual behavior
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.
Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
Additional contextAdd any other context about the problem here.
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:
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.
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?
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: