是否支持多个CBCentralManager
个实例?如果是这样,他们开始支持哪个版本的iOS?
我在Apple邮件列表上找到了multiple emails,说明它们不是。但是,这不是通过例外或具有理论+sharedCentralManager
来强制执行的。有人说文档说它们不受支持。但是,在the documentation中不再提及,并且当前头文件注释(iOS 8.3 SDK)是:
/*!
* @class CBCentralManager
*
* @discussion Entry point to the central role. Commands should only be issued when its state is <code>CBCentralManagerStatePoweredOn</code>.
*
*/
我不希望CBPeripheral
个实例在CBCentralManager
个实例之间移植(这不是这个问题的关键),我只希望有多个&#34;窗户&#34;进入蓝牙堆栈(没有任何不正常的行为)。
答案 0 :(得分:4)
从iOS 8.3开始,创建第二个CBCentralManager
实例似乎会导致第二个实例将其状态报告为CBCentralManagerStateUnsupported
(2
)。因此,不支持CBCentralManager
的多个实例。