I am trying to get the notification from a bluetooth device upon the characteristic value change. For this I need to enable notification for Client Characteristic Configuration(CCC) descriptor. I have used
setNotifyValue(enabled: Bool, forCharacteristic characteristic: CBCharacteristic) for the characteristic but not getting the update for value changes.
I tried to enable the indication for CCC using
writeValue(data: NSData, forDescriptor descriptor: CBDescriptor) but my app crashes for this API and shows the error as
Cannot write Client Characteristic Configuration descriptors using this method!