【发布时间】:2016-01-11 12:17:22
【问题描述】:
是否可以在后台扫描广告 UUID 的外围设备,该 UUID 不是已知的配置文件?我有一个外围设备广告这些服务 UUID:1804、1802、1803、“00000200-37CB-11E3-8682-0002A5D5C51B
当我这样扫描时:
centralManager.scanForPeripheralsWithServices([CBUUID(string:"00000200-37CB-11E3-8682-0002A5D5C51B")], 选项:无)
我在后台找不到设备,但是,当我像这样扫描时:
centralManager.scanForPeripheralsWithServices([CBUUID(string:"1804")], 选项:无)
我可以在后台找到设备。
我还想知道 CBCentralManagerScanOptionSolicitedServiceUUIDsKey 的用途是什么,以及指定此选项与使用 scanForPeripheralsWithServices 中的第一个参数有何不同。
【问题讨论】:
标签: ios background bluetooth bluetooth-lowenergy