多个 CBCentralManager 实例?
Multiple CBCentralManager instances?
是否支持多个 CBCentralManager
实例?如果是这样,它们是从哪个版本的 iOS 开始支持的?
找到multiple emails on the Apple mailing lists stating that they are not. However, this is not enforced with exceptions or by having a theoretical +sharedCentralManager
. One states that the documentation says that they are not supported. However, that is no longer mentioned in the documentation,当前头文件注释(iOS8.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
个实例之间移植(这不是这个问题的目的),我只是希望有多个 "windows"蓝牙堆栈(没有任何异常行为)。
从 iOS 8.3 开始,似乎创建第二个 CBCentralManager
实例将导致第二个实例将其状态报告为 CBCentralManagerStateUnsupported
(2
)。因此,不支持 CBCentralManager
的多个实例。
是否支持多个 CBCentralManager
实例?如果是这样,它们是从哪个版本的 iOS 开始支持的?
找到multiple emails on the Apple mailing lists stating that they are not. However, this is not enforced with exceptions or by having a theoretical +sharedCentralManager
. One states that the documentation says that they are not supported. However, that is no longer mentioned in the documentation,当前头文件注释(iOS8.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
个实例之间移植(这不是这个问题的目的),我只是希望有多个 "windows"蓝牙堆栈(没有任何异常行为)。
从 iOS 8.3 开始,似乎创建第二个 CBCentralManager
实例将导致第二个实例将其状态报告为 CBCentralManagerStateUnsupported
(2
)。因此,不支持 CBCentralManager
的多个实例。