public void Write(byte[] data)
{
if (!CanWrite)
throw new InvalidOperationException("Characteristic does not support WRITE");
var nsData = NSData.FromArray(data);
var writeType = ((Properties & CharacteristicPropertyType.AppleWriteWithoutResponse) > 0) ?
CBCharacteristicWriteType.WithoutResponse :
CBCharacteristicWriteType.WithResponse;
_peripheral.WriteValue(nsData, _nativeCharacteristic, writeType);
}