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:
-
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. -
Configure Wallet Extensions:
Follow the Wallet Extensions documentation to configure the app, including all required settings for the Non-UI Extension. -
Add Code to Retrieve Payment Passes:
In the main app’sLoginView, implement the following code in thehandleLogin()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) } } } -
Verify Functionality in Main App:
Run the app and verify that the code successfully retrieves the payment passes bound to the user’s account. -
Implement Code in Non-UI Extension:
Add the same code to the Non-UI Extension, specifically in theWNonUIExtHandlerclass within theoverride func status(completion: @escaping (PKIssuerProvisioningExtensionStatus) -> Void)method. -
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!