iOS Background Bluetooth: BLE scanning and Connect

I am developing an app that sends and receives signals by directly connecting a Bluetooth device. In the foreground, the device scan and connection are implemented, but in the background, the Bluetooth scan does not work. centralManager(_ central: CBCentralManager, didDiscover does not detect devices. Also Added bluetooth-central, bluetooth-peripheral to lnfo.plist.

How can I scan bluetooth in the background?
Most common cause of not detecting peripherals in the background (in a timely manner) is improper advertising by the peripheral.

It is recommended that the peripheral advertise at one of 20ms, 152.5 ms, 211.25 ms, 318.75 ms, 417.5 ms, 546.25 ms, 760 ms, 852.5 ms, 1022.5 ms, or 1285 ms intervals for a better probability of discovery.

The larger the advertising interval, the longer it will take to discover the peripheral, especially when the app is not in the foreground.
You will need to balance the power needs and your need to a speedy discovery for your use case, and pick a suitable advertising interval.

iOS Background Bluetooth: BLE scanning and Connect
 
 
Q