ios 蓝牙写入警告

蓝牙调用写方法时报警告
self.peripheral?.writeValue(data!, for: self.characteristic!, type:CBCharacteristicWriteType.withoutResponse)

警告如下:
[CoreBluetooth] WARNING: Characteristic <CBCharacteristic: 0x1700b5840, UUID = FFF3, properties = 0x8, value = (null), notifying = NO> does not specify the "Write Without Response" property - ignoring response-less write

我有两代蓝牙设备,他们的CBPeripheral不一样,第一代蓝牙设备的CBPeripheral只有一个,第二代蓝牙设备有5个,在做写操作时都是执行上面的self.peripheral?.writeValue(data!, for: self.characteristic!, type:CBCharacteristicWriteType.withoutResponse)操作,第一代蓝牙设备没有警告,第二代就出现上面的警告,这个是为啥么?

阅读 4.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题