I'm working on App that allows users to add their credit card to the Apple Wallet and users can, from the App add the card to both the phone and watch.
Once the user succeeds to add in either device I'm successfully show the card was added to phone or watch, so next time I'll display a message say that and a button saying to add to the remaining device (can be either phone or watch).
Is there a way for to tell the Apple Wallet to display only the watch or the phone when we call openPaymentSetup
on PKPassLibrary
?
From the documentation this doesn't seem possible, but I wanted to double check if I missed anything.
Thank you in advance.
You just need to correctly setup the parameter
primaryAccountIdentifier
of yourPKAddPaymentPassRequestConfiguration
when initializingPKAddPaymentPassViewController
.That will solve your problem, as stated in documentation of
primaryAccountIdentifier
: This property lets you filter out the devices that already contain a matching pass.