gpt4 book ai didi

ios - 禁止自动 Apple Pay 建议

转载 作者:可可西里 更新时间:2023-10-31 23:57:22 27 4
gpt4 key购买 nike

我已经创建了一个具有核心蓝牙框架的应用程序,但我的物联网设备同时包含蓝牙和 NFC。因此,当我进入 NFC 范围时,Apple Pay 弹出窗口触发。

当我的应用程序处于前台或后台时,他们是否有任何方法可以抑制 Apple Pay 弹出窗口。

最佳答案

首先,我原以为您无需靠近到足以检测到 NFC 就可以建立蓝牙连接,但这不是您的问题。

您可以通过调用 requestAutomaticPassPresentationSuppression(responseHandler:) 来抑制 ApplePay 显示当您的应用程序在前台时来自 PassKit 框架。

注意:

This method requires a special entitlement issued by Apple. If the entitlement is not present, the request will fail with a PKPassLibrary result.

具体来说,您需要 com.apple.developer.passkit.pass-presentation-suppression 授权。

如果此应用供您自己使用,您应该能够将此权利添加到您的权利文件中。要将其提交到 App Store,您需要联系 Apple 以获得此权利。

当您的应用程序不在前台时,您无法禁止 ApplePay。

关于ios - 禁止自动 Apple Pay 建议,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50814181/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com