Issue Retrieving Bound Cards in Wallet Extension Non-UI Extension

Hi,

I’m encountering an issue in my app’s Wallet Extension, specifically within the Non-UI Extension, where we are unable to retrieve payment passes bound to a user’s account. The same code that successfully retrieves these bound cards in the main app does not work when used in the Non-UI Extension.

Case-ID: 8932090

Steps to Reproduce:

  1. Set up In-App Provisioning:
    Ensure that the app has the necessary In-App Provisioning permissions. This functionality works correctly in the main app, confirming that the permissions are properly configured.

  2. Configure Wallet Extensions:
    Follow the Wallet Extensions documentation to configure the app, including all required settings for the Non-UI Extension.

  3. Add Code to Retrieve Payment Passes:
    In the main app’s LoginView, implement the following code in the handleLogin() method to retrieve payment passes:

    // Get the identifiers of payment passes that already exist in Apple Pay.
    paymentPassLibrary = self.passLibrary.passes(of: .secureElement)
    
    for pass in paymentPassLibrary {
        if let identifier = pass.secureElementPass?.primaryAccountIdentifier {
            if pass.isRemotePass && pass.deviceName.localizedCaseInsensitiveContains("Apple Watch") {
                remotePassIdentifiers.insert(identifier)
            } else if !pass.isRemotePass {
                passIdentifiers.insert(identifier)
            }
        }
    }
    
  4. Verify Functionality in Main App:
    Run the app and verify that the code successfully retrieves the payment passes bound to the user’s account.

  5. Implement Code in Non-UI Extension:
    Add the same code to the Non-UI Extension, specifically in the WNonUIExtHandler class within the override func status(completion: @escaping (PKIssuerProvisioningExtensionStatus) -> Void) method.

  6. Test in Wallet Extension:
    Run the Wallet Extension and observe that the payment passes are not retrieved when the code is executed in the Non-UI Extension.

Has anyone encountered a similar issue or can provide insight into why the code might not work in the Non-UI Extension compared to the main app?

Support Information:

  • iOS Version: 17.5.1
  • Development environment: Xcode 15.4 (15F31d), macOS 14.3 (23D56)

Any help or suggestions would be greatly appreciated. Thank you!

Answered by DTS Engineer in 802645022

Hi @Harris333,

Please confirm that the associatedApplicationIdentifiers configured by your PNO contains the bundle IDs for the issuer app as well as both Wallet extensions. It is this configuration that allows the processes identified by these bundle ID values access to the user's pass library provisioned by the issuer.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Accepted Answer

Hi @Harris333,

Please confirm that the associatedApplicationIdentifiers configured by your PNO contains the bundle IDs for the issuer app as well as both Wallet extensions. It is this configuration that allows the processes identified by these bundle ID values access to the user's pass library provisioned by the issuer.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Issue Retrieving Bound Cards in Wallet Extension Non-UI Extension
 
 
Q