iOS 18 beta: nRF Connect says "Your device reports an unknown error for Bluetooth use." How to detect the issue programmatically?

On iOS 18 beta we faced a random issue: creating CBCentralManager doesn't trigger BLE permission dialog. There is a thread about this on Apple forums.

Freshly installed nRF Connect app cannot request Bluetooth permission too, instead it says "Your device reports an unknown error for Bluetooth use."

I couldn't find in Nordic repositories how nRF Connect detects that there is some unknown issue.

My question is - how can I detect that there is some unknown issue with Bluetooth? How does nRF Connect decide when to show this label?

Parents
  • Hi,

    nRF Connect decide like this (pseudocode):

    switch cbCentralManager.state {
    case .resetting:
        // blip in Bluetooth availability. Inform the user
    case .poweredOn:
        // good to go. Bluetooth available
    default:
        // assume there's an error
    }
    
    guard cbCentralManager.state == .poweredOn else { 
        // if not .poweredOn, we can't scan
    }
    cbCentralManager.scanForPeripherals()

    Regards,
    Terje

  • Hi  , thank you.

    That's strange, because when I ran a sample app on that device, I noticed that cbCentralManager.state is always .unknown, and I didn't receive any notifications from CBCentralManagerDelegate - centralManagerDidUpdateState was never called, like described here. So I thought that nRF Connect does something special in addition to your check.

    I didn't check CBManager.state though.

Reply
  • Hi  , thank you.

    That's strange, because when I ran a sample app on that device, I noticed that cbCentralManager.state is always .unknown, and I didn't receive any notifications from CBCentralManagerDelegate - centralManagerDidUpdateState was never called, like described here. So I thought that nRF Connect does something special in addition to your check.

    I didn't check CBManager.state though.

Children
Related