Check if card already added to PassKit library in App Clip

I'm developing an App Clip to add cards to Apple Wallet,and I want to check if card already added to PassKit library.For example, to show "Apple Pay enabled" checkmark on a card's UI.

when I call these codes:

PKPassLibrary *passLibrary = [[PKPassLibrary alloc] init];

NSArray<PKPass *> *paymentPasses = [passLibrary passesOfType:PKPassTypePayment];

the paymentPasses returns an empty array.I want to know if App Clip can access passes, and how can I get the entitlements to query the pass library.

Answered by DTS Engineer in 797196022

Hi @Jonathan@sh,

Adding payment passes requires a special entitlement issued by Apple. Your app, app extensions, and app clip integrating with Apple Pay must include this entitlement before PKAddPaymentPassViewController can be instantiated. For more information on requesting this entitlement, contact:

  • apple-pay-inquiries [at] apple.com

Once approved for the special entitlement, to enable Apple Pay In-App Provisioning in your project, see Configuring Apple Pay support.

Cheers,

Paris

Hi @Jonathan@sh,

Adding payment passes requires a special entitlement issued by Apple. Your app, app extensions, and app clip integrating with Apple Pay must include this entitlement before PKAddPaymentPassViewController can be instantiated. For more information on requesting this entitlement, contact:

  • apple-pay-inquiries [at] apple.com

Once approved for the special entitlement, to enable Apple Pay In-App Provisioning in your project, see Configuring Apple Pay support.

Cheers,

Paris

Check if card already added to PassKit library in App Clip
 
 
Q