Why do I get CBCentralManagerStateUnknown
on an iPad 2 when using this simple code?
- (BOOL)viewDidLoad {
bluetoothManager = [[CBCentralManager
The actual answer (old question I know); start a scan for peripherals, this will start BT LE up and your delegates will get called back. My Delegates and state info did not change until I did this.
a. Setup your cbcentralmanager as below b. Have the -central* delegates in your code and in your .h file c. NSLog or have a label on screen update with new status. And... Success.
cManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
[cManager scanForPeripheralsWithServices:nil options:@{CBCentralManagerScanOptionAllowDuplicatesKey: @YES}];