ApplePay - In-App provisioning PKPassLibrary method issue

I can add a payment card in the app through in-app provisioning sdk.

However, After adding a card, I need to showing whether the card has been added or not. And I should show as the UI that can add card after I deleted the card from Apple Wallet app.

But, I can't get valid value from calling below methods.


I tested it in the sandbox environment. And I also tested it in the TestFlight.


- (NSArray<PKPass *> *)passes;

-> The count of NSArray is 0.


- (NSArray<PKPass *> *)passesOfType:(PKPassType)passType API_AVAILABLE(ios(8.0), watchos(3.0));

-> The count of NSArray is 0.


-(NSArray<PKPaymentPass *> *)remotePaymentPasses API_AVAILABLE(ios(9.0));

-> The count of NSArray is 0.


- (BOOL)canAddPaymentPassWithPrimaryAccountIdentifier:(NSString *)primaryAccountIdentifier API_AVAILABLE(ios(9.0));

-> The return value is alway YES. I got the primaryAccountIdentifier from PkPaymentPass and entered the value. Even I entered the random string or empty value in the argument, the return value is YES.


I wonder if there is an additional way or is there something wrong.

Replies

That's becuase the card that has been provisioned (by your backend systems) doesn't contain the application's bundle ID. The field is called `associatedApplicationIdentifiers`.

See In-App provisioning Getting Started Guide for a deeper explanation.


Thank you, pallzoltan.


Could you please let me know how to contain the application's bundle ID to the card?

I saw the guide document but I don't know well. Should I add the 'associatedApplicationIdentifiers' in server side? or client app side?

Hello, I have encountered the same problem. How did you solve it?

Hi,


Were you able to test through in-app provisioning with the provided Sandbox Testing cards (https://developer.apple.com/apple-pay/sandbox-testing/)? Is that possible?


Is there another way of testing this functionality without uploading the app to the App Store?