由于業(yè)務(wù)要求露泊,需要禁掉藍(lán)牙的系統(tǒng)彈窗
1.從app應(yīng)用安裝到手機(jī)斗塘,只會(huì)彈一次系統(tǒng)彈窗
初始化方式為:
manager = [[CBCentralManageralloc]initWithDelegate:selfqueue:dispatch_get_main_queue()options:nil];
2.每次初始化藍(lán)牙api都會(huì)彈框
CBCentralManager*manager = [[CBCentralManageralloc]initWithDelegate:selfqueue:dispatch_get_main_queue()];
3.禁止系統(tǒng)藍(lán)牙彈框
初始化藍(lán)牙api
manager = [[CBCentralManageralloc]initWithDelegate:selfqueue:dispatch_get_main_queue()options:@{}];
options后參數(shù)默認(rèn)為CBCentralManagerOptionShowPowerAlertKey:@(NO)
若CBCentralManagerOptionShowPowerAlertKey對(duì)應(yīng)的value為YES蜻牢,則效果跟2相同