CBCentralManagerConstants

字典key 对应布尔值
CBCentralManagerOptionShowPowerAlertKey NS_AVAILABLE(NA, 7_0);
CBCentralManagerOptionRestoreIdentifierKey NS_AVAILABLE(NA, 7_0);

CBCentralManagerScanOptionAllowDuplicatesKey
//key值是NSNumber,默认值为NO表示不会重复扫描已经发现的设备,如需要不断获取最新的信号强度RSSI所以一般设为YES了
scanForPeripheralsWithServices:options:方法中的options参数

CBCentralManagerScanOptionSolicitedServiceUUIDsKey NS_AVAILABLE(NA, 7_0);
你想扫描的serviceUUID数组

2

CB_EXTERN NSString * const CBConnectPeripheralOptionNotifyOnConnectionKey
OnConnectionKey在程序被挂起时,连接成功显示Alert提醒框
CB_EXTERN NSString * const CBConnectPeripheralOptionNotifyOnDisconnectionKey;
OnDisconnectionKey在程序被挂起时,断开连接显示Alert提醒框
CB_EXTERN NSString * const CBConnectPeripheralOptionNotifyOnNotificationKey
OnNotificationKey在程序被挂起时,显示所有的提醒消息
NSDictionary *options = @{CBConnectPeripheralOptionNotifyOnDisconnectionKey: @TRUE};
[_centralmanager connectPeripheral:device options:options];

3

CB_EXTERN NSString * const CBCentralManagerRestoredStatePeripheralsKey NS_AVAILABLE(NA, 7_0);
CB_EXTERN NSString * const CBCentralManagerRestoredStateScanServicesKey NS_AVAILABLE(NA, 7_0);
CB_EXTERN NSString * const CBCentralManagerRestoredStateScanOptionsKey NS_AVAILABLE(NA, 7_0);

蓝牙博客

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容