ios - 尝试范围信标时出现“CoreBluetooth [API MISUSE] CBCentralManager仅在开机状态下接受命令”错误

标签 ios objective-c core-bluetooth ibeacon estimote

我正在尝试在我的应用程序中估计信标范围。
但是,当应用程序在触发[beaconManager:didRangeBeacons:inRegion:]方法后对信标进行范围设置时,它会输出“ CoreBluetooth [API MISUSE] CBCentralManager仅在处于开机状态时才能接受命令”进入调试控制台,而且我也无法连接到信标以更改某些内容我可以设置信标范围并读取不需要连接到信标的值,例如次要,主要,邻近等,但我还需要更改它们。

我怎么了

提前致谢!

最佳答案

我遇到了同样的问题。我怀疑这是Estimote SDK的错误。我设法通过调用startEstimoteBeaconsDiscoveryForRegion方法来解决此问题(我相信可以继续打开CBCentralManager)。我的初始化代码如下:

_estBeaconManager = [[ESTBeaconManager alloc] init];
_estBeaconManager.delegate = self;
_estBeaconRegion = [[ESTBeaconRegion alloc] initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID identifier:@"Estimotes"];
[_estBeaconManager startRangingBeaconsInRegion:_estBeaconRegion];
[_estBeaconManager startEstimoteBeaconsDiscoveryForRegion:_estBeaconRegion];

希望这可以帮助

关于ios - 尝试范围信标时出现“CoreBluetooth [API MISUSE] CBCentralManager仅在开机状态下接受命令”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24177416/

相关文章:

ios - UICollectionView 单元格在重新加载数据后保持突出显示

iphone - 在 UITableView 中垂直居中 UITableViewCell

objective-c - 改变 View 的问题

iOS8 和 BTLE | CBCentralManager 无法找到外围设备

ios - 具有已知外设 UUID 的蓝牙设备(包括 Apple AirPods)的后台扫描

ios - CBManager 状态始终未知

ios - 如果我在 block 内使用ivar,它是一个保留周期吗?

ios - 用换行符替换换行文本后获取 UILabel 的文本

ios - 从 web json 解析图像

objective-c - bool 与 bool