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

Answered by edorphy in 784304022

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.

Accepted Answer

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.

How to add a CBMutableDescriptor
 
 
Q