Hi, we are implementing the push provisioning via the Apple Wallet Extension starting from the example at https://developer.apple.com/documentation/passkit/implementing-wallet-extensions.
To correctly manage the push provisioning on Apple Watch, specifically for a card tokenised in the iPhone but not in the Watch, we need to know if there is a connected Apple Watch to the iPhone.
We are using the following code from the Apple Wallet Extension example to detect whether there is a connected watch:
WCSession* session = [WCSession defaultSession];
session.delegate = delegate;
[session activateSession];
In the main target of the app, at the end of the activation the system correctly calls the delegate method:
session:activationDidCompleteWithState:error:
but we noticed it is not being called in the UI extension context (the one having NSExtensionPointIdentifier: com.apple.PassKit.issuer-provisioning.authorization).
We don't understand why the delegate is not being called in the UI extension, can you please help?
Thanks!
Steps to Reproduce:
- Start with a card not added in the Apple Wallet app
- Open the Apple Wallet app
- Click on add card
- Select the app to launch the Wallet Extension flow
- The Apple Wallet Extension with UI is on screen and invokes the activateSession method, the delegate method is not invoked and session.isPaired returns "no".
Xcode Version 16.2
macOS Version 15.6.1 (24G90)
Feedback ID FB20082564