How to add a CBMutableDescriptor

Hello, whenever I want to add a CBMutableDescriptor, either with CBMutableDescriptor(type: CBUUID(string: "2901"), value: nil)

or using the defined string CBUUIDCharacteristicUserDescriptionString:

I get the following error message:


*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expecting NSData value type for Format descriptor'

What am I doing wrong here? Thanks

Accepted Reply

From the error message, it looks like a value of nil is not acceptable. Try adding a UTF8 string value and see if it works then.

Replies

From the error message, it looks like a value of nil is not acceptable. Try adding a UTF8 string value and see if it works then.