ios - CBCentralManager not detecting nearby devices -
CBCentralManager
does not detect nearby Bluetooth devices.
- (zero) viewDidoadload {[Super Viewedload]; _centralManager = [[CBCentralManager alloc] initWithDelegate: self queue: zero]; _data = [[NSMUtableData Allok] Init]; } - (Zero) Central ManagerED update: (CBC Central Manager) Central {if (central .state == CBCEntertainmentPoideon) {NSDictionary * options = @ {CBCentralManagerScanOptionAllowDuplicatesKey: @NO}; [_centralManager scanForPeripherals with services: zero option: option]; NSLog (@ "Scanning Started"); } If (central.state == CBCentralManagerStateUnknown) {NSLog (@ "CBCentralManagerStateUnknown"); } If (CentralStat == CBCEntryManagerState Resetting) {NSLog (@ "C CB Central Manager Setting"); } If (central .state == CBCentralManagerStateUnsupported) {NSLog (@ "CBCentralManagerStateUnsupported"); } If (CentralStat == CBCEnmentalManagerState unauthorized) {NSLog (@ "CBCEntrealManagerStateUnited"); } If (CentralStat == CBCEnmentalGeneratePoideOff) {NSLog (@ "CBCEnTermNestAstertPaidOf"); }}
I have checked that state CBCentralManagerStatePoweredOn
after that it does not call representative's methods.
Comments
Post a Comment