我现在正在集成 Apple Pay,我明白了 Apple Pay 的 iOS 人机界面指南。
https://developer.apple.com/ios/human-interface-guidelines/technologies/apple-pay/
如何在用户点击按钮时打开电子钱包应用程序?
最佳答案
查看 PKPaymentButton
。作为 PassKit 的一部分,已经有为此预先构建的按钮。
let setupButton = PKPaymentButton(type: .setUp, style: .black)
更多信息可以在 PKPaymentButton Reference 找到.
编辑:
PKPassLibrary
实际上可以执行该操作。你可以像这样使用它:
let library = PKPassLibrary()
library.openPaymentSetup()
可以找到更多信息here .
注意:上述调用仅适用于真实的 iOS 设备。
关于iOS 如何将用户直接带到钱包应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40397515/