As per the iOS Bluetooth Framework, iOS device cache the BLE peripheral services.
I am using Nordic s130 nrf51822 chipset for BLE communication.
Now When I add the BLE device into my iOS app. its services get cached. But as per the Nordic documentation when you have services changed in future, You need to add an IS_Service_Changed (0x2A05) flag in your bootloader mode as well as in application mode.
We have added that under generic attribute service i.e 0x1801. Now when I changed the services, iOS should get the service change callback in peripherals
didModifyServices delegate method. But I am not able to get the callback for didModifyServices.
As per the apple Bluetooth design guidelines here: https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf
Some services handled internally by IOS and not shown to third party apps. (explained in 3.12 GATT Server) it includes
- Generic Attribute Profile Service
- Generic Access Profile Service
- Bluetooth Low Energy HID Service
- Apple Notification Center Service
So, How I will get a callback for didModifyServices?How can I clear the BLE cache programmatically?
Note: I am not using Bonded connection for BLE.I have also tried to turn Bluetooth ON/OFF and still the BLE cache not get clear.