I am planning to run the AccessoryNotifications framework on xcode26.4 and ios26.4, please refer to the documentation
https://developer.apple.com/documentation/accessorynotifications
I couldn't find a complete demo, but I found a demo based on AccessorySetup Kit, ASK Sample
https://docs-assets.developer.apple.com/published/89f5eef578ef/SettingUpAndAuthorizingABluetoothAccessory.zip.
So I plan to practice the entire process of AccessoryNotifications based on this demo.
Find accessories based on ASK Sample and connect them, OK
Call requestForwarding (for:), OK
Add AccessoryData Provider extension to receive system notifications
But this step failed. I added an extension according to the documentation, but the following method will not be executed
func activate(for session: NotificationsForwarding.Session)
func add(notification: AccessoryNotification alertingContext: AlertingContext,
alertCoordinator: AlertCoordinating) {}
I found the following error log in console.app
Error 16:38:17.582340+0800 usernotificationsd ### XPC DAEventExtension decode failed: DAExtensionSession: CID 0x89B80004, DAExtensionSessionConfiguration 'AB83C506-9F35-40FB-9A68-919D43B4D098': BundleID 'com.sifli.ASKSample', DAErrorDomain:350001 'DAExtensionEvent init bad type: 42'
I have tried many methods to send messages to the testing phone, local Notifications, We can't even trigger the AccessoryData Provider, activate:for,add:notification:
1.Do I have to add the following two extensions according to the document in order to debug successfully?
AccessoryTransportSecurity
Manages cryptographic key exchange with your accessory.
AccessoryTransportAppExtension
Relays encrypted data to your accessory over Bluetooth.
2.What should be selected in the extension template panel of xcode 26.4 when creating these extensions?
Geniric Extension
Accessory Data Transport
I am currently using Geniric Extension
Topic:
App & System Services
SubTopic:
Notifications
0
0
21