如何检测 iOS 15 中默认管理订阅的关闭按钮操作?

Sau*_*hah 5 subscription in-app-purchase ios swift

我已使用 showManageSubscriptions 函数在应用程序内显示带有订阅选项的订阅表,但表中有一个关闭按钮,未检测到该操作,但按钮是可单击的。

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

请帮助我获得关闭按钮操作。

参考链接:https://developer.apple.com/documentation/storekit/appstore/3803198-showmanagesubscriptions#parameters

请看截图在此输入图像描述

Sau*_*hah 4

最后!我得到了它的解决方案。

\n

这是苹果方面的缺陷。苹果已在 iOS 15.4 及更高版本的操作系统上修复了该问题。

\n

测试\xe2\x9c\x94\xef\xb8\x8f

\n