Search code examples
iosswiftxcodein-app-purchase

Why subscription screen doesn't open if the Subscription is not active? Xcode Swift iOS


I have used showManageSubscriptions function show subscription sheet with subscription options within the application but when subscription haven’t purchase or not active then sheet can not open.

@available(iOS 15.0.0, *)
    func showManageSubscription(_ windowScene: UIWindowScene) async {
        do {
            try await StoreKit.AppStore.showManageSubscriptions(in: windowScene)
        } catch {
            print("Sheet can not be opened")
        }
    }

Is there any way to open sheet in this case even subscription haven’t purchase or not active? So user can at least buy again.

I want Apple default subscription sheet like this to buy subscription.

enter image description here


Solution

  • As explained in the document, you can only use it for upgrade, downgrade, or cancel. I recommend you to design a custom IAP screen, you can use tools like revenuecat to manage