I am using CoreBluetooth
and the callback method didDiscoverPeripheral
gets called frequently when the app is foregrounded or backgrounded or the device is locked with device screen still turned on.
But as soon as the screen is turned off / blacked out (Sleep mode) its callback frequency is reduced to almost nothing.
What might be causing this? The device battery is full and Bluetooth turned on.
Please help me with this issue.
Thanks.
I was unable to find any direct answers as to why the iOS behaves this way. Although I have found an alternative way to resolve this.
I am implementing a PeripheralManager along with the CentralManager. That way even though the iOS device's screen is turned off, i have control of the iOS device.