title: CBCentralManager state is Off, even-though the bluetooth is ON
body: <p>I am trying to check whether the bluetooth is turned on/off with the following code. But it returns CBManagerStatePoweredOff even-though the bluetooth is already on. I checked it in iPhone6s and iOS version 11.2.5(15D60). If i restart bluetooth manually on the settings, It returns CBManagerStatePoweredOn. </p>
  
  <pre><code>- (void)detectBluetooth
  {
    if(!bluetoothManager)
    {
      // Put on main queue so we can call UIAlertView from delegate callbacks.
      //    NSDictionary *options = @{CBCentralManagerOptionShowPowerAlertKey: @NO};
      //    bluetoothManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil options:options];
      bluetoothManager = [[CBCentralManager alloc] initWithDelegate:self queue:dispatch_get_main_queue()];
      [bluetoothManager scanForPeripheralsWithServices:nil options:nil];
    }
  
    [self centralManagerDidUpdateState:bluetoothManager]; // Show initial state
  }
  
  - (void)centralManagerDidUpdateState:(CBCentralManager *)central
  {
    NSString *stateString = nil;
    switch(central.state)
    {
      case CBManagerStateResetting:
        stateString = @"The connection with the system service was momentarily lost, update imminent.";
        break;
      case CBManagerStateUnsupported:
        stateString = @"The platform doesn't support Bluetooth Low Energy.";
        break;
      case CBManagerStateUnauthorized:
        stateString = @"The app is not authorized to use Bluetooth Low Energy.";
        break;
      case CBManagerStatePoweredOff:
        stateString = @"Bluetooth is currently powered off.";
        break;
      case CBManagerStatePoweredOn:
        [self goToSearchDevices];
        break;
      default: stateString = @"State unknown, update imminent."; break;
    }
  }
  </code></pre>