Re: CBPeripheralDelegate -peripheral:didModifyServices not called
Additional information: - updated to iOS 10b8 - the system console seems to register that the Services Changed notification was received, but the app still does not catch the -didModifyServices: CBPeripheralDelegate protocol method implementation. The app writes to the characteristic which causes the peripheral to modify it’s GATT database: Aug 29 10:58:33 MyPhone BTServer[71] <Notice>: Received XPC message "CBMsgIdCharacteristicReadValue" from session "com.mycompany.myApp-central-5357-0" Aug 29 10:58:33 MyPhone BTServer[71] <Notice>: Received XPC message "CBMsgIdCharacteristicWriteValue" from session "com.mycompany.myApp-central-5357-0" Aug 29 10:58:33 MyPhone BTServer[71] <Notice>: Sending XPC message "CBMsgIdCharacteristicValueWritten" to session "com.mycompany.myApp-central-5357-0” It appears that the system receives the Services Changed notification and attempts to tell the app: Aug 29 10:58:33 MyPhone BTServer[71] <Notice>: Sending 'device services changed' event for device "<private>" to session "com.mycompany.myApp-central-5357-0" Aug 29 10:58:33 MyPhone BTServer[71] <Notice>: Sending XPC message "CBMsgIdPeripheralServicesChanged" to session "com.mycompany.myApp-central-5357-0” However, the app does not call the peripheral delegate’s -didModifyServices: implementation. Other peripheral delegate methods are called as expected. Any insight? -Robert
On Aug 24, 2016, at 6:09 PM, Robert Carlsen <robert@robertcarlsen.net> wrote:
Hello all,
I have a peripheral which implements the Service Changed characteristic and notifies when the GATT database is modified after enabling it’s bootloader (it exposes a new service with one characteristic).
With iOS 8/9 our CBPeripheralDelegate implementation receives a call at -peripheral:didModifyServices:. In iOS 10b7 (unsure about earlier betas) we don’t seem to get called with that delegate method.
Disconnecting and re-connecting (or manually calling -discoverServices) does indeed show that the new service is visible.
Has anyone else experienced an issue with not receiving the -peripheral:didModifyServices: call on iOS 10? Have there been any changes within CoreBluetooth that either the app or firmware needs to account for to restore the expected behavior?
Thank you, -Robert
_______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Robert Carlsen