Can not detect specific ble(Bluetooth Low Energy) on iOS 17

370 Views Asked by At

My app has a tableView to display some ble devices. The delegate method

@available(iOS 5.0, *)
optional func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber)

will filter some specific devices using peripheral.name

This worked fine on iOS 16.

But on iOS 17, peripheral.name for same ble devices return nil

I've searched this issue on Apple's Documentations for several hours. No result came out.

Is there any new API for CBCentralManager?

1

There are 1 best solutions below

0
trimaximus On

Apple's Fault!

After I updated Xcode to 15.0.1peripheral.name is not nil any more, ble devices can be detected without any code changes.