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

I have used showManageSubscriptions function to show the subscription sheet with subscription options within the application but when a subscription is not purchased or not active the sheet is 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 the sheet in this case even subscription is not purchased or not active? So users can at least buy again.

I want Apple's default subscription sheet like this to buy a subscription.

Hello, Are you observing the sheet not loading an expired subscription in Sandbox or while testing in Xcode locally? In production that subscription is visible in the Subscriptions management page for up to 1-year past expiry. If reproducible please provide a sysdiagnose and submit a ticket at FeedbackAssistant.Apple.com

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