当我使用以下方法禁用重复键过滤时:
NSDictionary *options = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:CBCentralManagerScanOptionAllowDuplicatesKey];
构建和运行工作正常(并捕获所有广告数据包),但它总是首先产生此错误:
“CoreBluetooth[WARNING] 正在禁用重复过滤,但使用默认队列(主线程)处理委托事件”
如果我添加,我可以停止显示警告:
dispatch_queue_t centralQueue = dispatch_queue_create("central", DISPATCH_QUEUE_SERIAL);
在我创建 CBCentralManager 实例并将队列参数设置为 centralQueue 之前。这是解决此问题的正确方法吗?或者,还有更好的方法?
谢谢