【发布时间】:2013-02-18 10:04:03
【问题描述】:
我的 BLE 应用程序在后台运行并扫描外围设备,但委托方法 centralManager:didDiscoverPeripheral:advertisementData:RSSI: 不是回调。我在 Info.plist 中为UIBackgroundModes 设置了值。为什么?如何解决?
【问题讨论】:
-
这和here是同一个问题。
标签: iphone background
我的 BLE 应用程序在后台运行并扫描外围设备,但委托方法 centralManager:didDiscoverPeripheral:advertisementData:RSSI: 不是回调。我在 Info.plist 中为UIBackgroundModes 设置了值。为什么?如何解决?
【问题讨论】:
标签: iphone background
您无法在后台模式下扫描外围设备, 只需打开与外围设备的连接并保持对该外围设备的引用。
之后就可以调用了
[peripheral1 readRSSI];
并等待 CBPeripheralDelegate 回调
peripheralDidUpdateRSSI:
【讨论】: