更新时间:2022-05-13 21:54:46
当你得到centralManager的回调时状态已更改为 CBCentralManagerStatePoweredOff
,您需要遍历所有外围设备并在其上调用 cancelConnection:
。那你就好了。
When you get the callback that the centralManager state has changed to CBCentralManagerStatePoweredOff
, you need to loop through all your peripherals and call cancelConnection:
on them. Then you'll be good to go.
[_yourCentralManager cancelPeripheralConnection:yourPeripheral];