I have been unable to convert CBCharacteristic's value property which is of type NSData to NSString. I tried the usual initWithData:encoding: method of NSString as given below. But it returns nil.
NSString *str = [[NSString alloc] initWithData:characteristic.value encoding:NSUTF8StringEncoding];
NSLog(@"%@", str);
I am able to see the string value on console when I do NSLog on value directly.
NSLog(@"characteristic.value: %@", characteristic.value);
Can aanybody give any idea on how to get the string value out of characteristic.value?