CBCentralManagerConstants

字典key 對應(yīng)布爾值
CBCentralManagerOptionShowPowerAlertKey NS_AVAILABLE(NA, 7_0);
CBCentralManagerOptionRestoreIdentifierKey NS_AVAILABLE(NA, 7_0);

CBCentralManagerScanOptionAllowDuplicatesKey
//key值是NSNumber,默認(rèn)值為NO表示不會重復(fù)掃描已經(jīng)發(fā)現(xiàn)的設(shè)備,如需要不斷獲取最新的信號強(qiáng)度RSSI所以一般設(shè)為YES了
scanForPeripheralsWithServices:options:方法中的options參數(shù)

CBCentralManagerScanOptionSolicitedServiceUUIDsKey NS_AVAILABLE(NA, 7_0);
你想掃描的serviceUUID數(shù)組

2

CB_EXTERN NSString * const CBConnectPeripheralOptionNotifyOnConnectionKey
OnConnectionKey在程序被掛起時(shí),連接成功顯示Alert提醒框
CB_EXTERN NSString * const CBConnectPeripheralOptionNotifyOnDisconnectionKey;
OnDisconnectionKey在程序被掛起時(shí),斷開連接顯示Alert提醒框
CB_EXTERN NSString * const CBConnectPeripheralOptionNotifyOnNotificationKey
OnNotificationKey在程序被掛起時(shí),顯示所有的提醒消息
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);

藍(lán)牙博客

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容