How to verify ios device supports Apple Pay

泄露秘密 提交于 2019-11-29 13:28:52

canMakePayments - Will return "YES" ( True / 1 ) irrespective of card configuration.

canMakePaymentsUsingNetworks - Will return "NO" , if card NOT configured or NOT configured properly.

So,should check both... If both should be TRUE then only need to make Button "Apple Pay" visible.

Hope this helps.

In swift 3.0 you can check your device support apple pay or not via this funcation is its return true then your device support apple pay. Here are the list of device that support apple pay :

iPhone 5s only if you purchase latest peace

iPhone SE,

iPhone 6 or later,

iPad Pro,

iPad 5th generation,

iPad Air 2,

iPad mini 3 or later,

and Apple Watch.

func applePaySupported() -> Bool {
            return PKPaymentAuthorizationViewController.canMakePayments() && PKPaymentAuthorizationViewController.canMakePayments(usingNetworks: [.amex, .visa, .masterCard])
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!