Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何检测CBBLE外围设备何时停止广告_Ios_Swift_Bluetooth Lowenergy_Core Bluetooth_Cbperipheral - Fatal编程技术网

Ios 如何检测CBBLE外围设备何时停止广告

Ios 如何检测CBBLE外围设备何时停止广告,ios,swift,bluetooth-lowenergy,core-bluetooth,cbperipheral,Ios,Swift,Bluetooth Lowenergy,Core Bluetooth,Cbperipheral,我正在编写一个应用程序,使用BLE将iPhone连接到iPad,并希望屏幕显示当前所有广播设备。有没有可靠的方法可以做到这一点?我已经让它工作了一两分钟,但之后我相信外围设备会更改其ID,并且CBPeripheralDelegate方法peripal(:didModifyServices:)停止被调用。有没有可靠的方法来检测CBP外设何时停止广告,或者至少有一种方法来检测ID的变化?我的想法是否完全错误?您通常会使用“允许重复项键”进行扫描,并使用计时器对扫描的外围设备列表进行老化。这样做了,谢

我正在编写一个应用程序,使用BLE将iPhone连接到iPad,并希望屏幕显示当前所有广播设备。有没有可靠的方法可以做到这一点?我已经让它工作了一两分钟,但之后我相信外围设备会更改其ID,并且CBPeripheralDelegate方法peripal(:didModifyServices:)停止被调用。有没有可靠的方法来检测CBP外设何时停止广告,或者至少有一种方法来检测ID的变化?我的想法是否完全错误?

您通常会使用“允许重复项键”进行扫描,并使用计时器对扫描的外围设备列表进行老化。这样做了,谢谢@加索尔