我知道有特定的 new method在支持特定场景或用例的 Apple Pay 抑制的 iOS 9 中。我有一个需要使用以下方法应用的人:
+ (PKSuppressionRequestToken)requestAutomaticPassPresentationSuppressionWithResponseHandler:(void (^ _Nonnull)(PKAutomaticPassPresentationSuppressionResult result))responseHandler
但是,每次调用此方法时,我们都会得到以下响应:PKAutomaticPassPresentationSuppressionResultDenied(用户阻止抑制,或发生内部错误)
在文档中标记为重要说明:
IMPORTANT This method requires a special entitlement issued by Apple. If the entitlement is not present, the request will fail with a PKAutomaticPassPresentationSuppressionResultNotSupported result. For more information, see developer.apple.com/apple-pay/.
我们应该怎么做才能获得 PKAutomaticPassPresentationSuppressionResultSuccess
结果?我们在我们的“Apple ID”中启用了 Apple Pay,甚至创建了一个商品 ID,然后再次下载了包含所有这些并包含在项目中的开发配置文件。在那里我们也启用了“Apple Pay”功能,但我们仍然收到 PKAutomaticPassPresentationSuppressionResultDenied
错误。
测试环境信息:
- iPhone 6 和支持 Apple Pay 的卡
- iOS 9.0.1 (13A404)
谢谢大家
最佳答案
在向 Apple Developer Technical Support (DTS) 发起私有(private)查询后,他们告诉我,我必须为此目的通过电子邮件申请特定的权利。在那封电子邮件中,我必须证明我为什么要使用这个 PassKit 功能以及如何使用它。
一旦他们提供了这项权利(几周后),将其添加到我们的配置文件中就足够了,requestAutomaticPassPresentationSuppressionWithResponseHandler
方法将毫无问题地运行。
关于ios - 检测到 13.56Mhz 时禁用 Apple Pay UI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32945213/