Unable to retrieve secure element pass after adding to Apple Wallet?

I am adding In-App provisioning to my app. I am able to access the Apple Pay Sandbox and I have successfully tested adding a secure element/payment pass to Apple Wallet. However, once the pass has been added to the wallet, I can not access or retrieve the pass from my app. I have confirmed with the PNO that the PNO Pass Metadata Configuration in the testing environment include the correct metadata for "associatedApplicationIdentifiers" and "associatedStoreIdentifiers".

Does anyone know why I am having this issue and how I can resolve it?

Steps used to access pass in Apple Wallet

I am unable to view the pass when I attempt to access it using the PKPassLibrary function as follows:

let library = PKPassLibrary()

if #available(iOS 13.4, *) {
    // This returns an empty array
    library.passes(of: .secureElement)
} else {
    // This also returns an empty array
    library.passes(of: .payment)
}

// This returns an empty array too
library.passes()

Steps used to add pass to Apple Wallet

These are the steps I follow to add the card:

  1. I create a PKAddPaymentPassRequestConfiguration
  2. I use this config to instantiate a PKAddPaymentPassViewController.
  3. I provide the nonce, nonceSignature, and certificates to my PNO along with the card data.
  4. I receive the activationData, encryptedPassData, and ephemeralPublicKey from my PNO and create a PKAddPaymentPassRequest using this data.
  5. I add the pass to Apple Wallet.

In the addPaymentPassViewController callback, I am able to view the pass data from the .didFinishAdding pass: PKPaymentPass? variable. I am also able to see that the pass has been added from Apple Wallet app. I am not able to access the pass using PKPassLibrary().passes() at this point. I am not able to access the pass at any point after adding it either.

Answered by gtaylor in 680277022

If anyone else has this problem, the solution turned out to be relatively simple. The card we were using to test had incorrect metadata attached to it and therefore our card did not have the associatedApplicationIdentifiers set correctly. If you have the "Getting Started with Apple Pay In-App Provisioning, Verification & Security (3.0)" document, see section 5.4. "PNO Pass Metadata Configuration" for more information.

I'm having the same issue

Hi - if you can report a bug using Feedback Assistant on your device we can investigate this further. Please be sure to include diagnostic logs and reports.

gtaylor, have you solved this issue?

Accepted Answer

If anyone else has this problem, the solution turned out to be relatively simple. The card we were using to test had incorrect metadata attached to it and therefore our card did not have the associatedApplicationIdentifiers set correctly. If you have the "Getting Started with Apple Pay In-App Provisioning, Verification & Security (3.0)" document, see section 5.4. "PNO Pass Metadata Configuration" for more information.

Hi gtaylor, how do you Pass Metadata Configuration? Document mentions LinkAndProvisionResponse API but I couldn't find anything about it.

I have the same issue and our PNO says same thing that, he has configured correctly. I don't know how can i verify that he had done correctly and where it goes wrong.

Unable to retrieve secure element pass after adding to Apple Wallet?
 
 
Q