声明并实例化 CBCentralManager

迅速:

var centralManager:CBCentralManager!

centralManager = CBCentralManager(delegate: self, queue: nil)

目标 C:

@property (nonatomic, strong) CBCentralManager *centralManager;

centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];