I'm integrating Apple Pay now and I see iOS Human Interface Guidelines for Apple Pay.
https://developer.apple.com/design/human-interface-guidelines/apple-pay/
How can I open the Wallet app when the user taps a button?
I'm integrating Apple Pay now and I see iOS Human Interface Guidelines for Apple Pay.
https://developer.apple.com/design/human-interface-guidelines/apple-pay/
How can I open the Wallet app when the user taps a button?
Check out the PKPaymentButton
. There are already pre-built buttons for this as part of PassKit.
let setupButton = PKPaymentButton(type: .setUp, style: .black)
More information can be found at the PKPaymentButton Reference.
EDIT:
PKPassLibrary
can actually perform the action. You can use it like so:
let library = PKPassLibrary()
library.openPaymentSetup()
More information can be found here.
Note: The above call will only work on a real iOS device.
Code in Objective C, same as @Mark answer:
First you have to import PassKit:
@import PassKit;
And call func to open Wallet App, func:
-(void) openAppleWalletApp {
PKPassLibrary * wallet = [[PKPassLibrary alloc] init];
[wallet openPaymentSetup];
}
© 2022 - 2024 — McMap. All rights reserved.