I am developing an application which is acts bluetooth-central and must scan for peripherals in foreground as well as in background mode. I have enabled "Uses Bluetooth LE accessory" background mode in Xcode capabilities. After many research I have an ide

Hello everyone!


I am developing an application which is using CoreBluetooth framework and acts as a bluetooth-central and must scan for peripherals in the foreground as well as in background mode. I have enabled "Uses Bluetooth LE accessory" background mode in Xcode capabilities. After much research, I have an idea that we must scan for peripherals on the basis of ServiceUUIDs when we need to scan in background mode, so I did that and now I am able to scan in background mode. But my problem is that after a few minutes (about 10 min approx or sometimes it's 25 min) my application automatically stops calling didDiscover peripheral method and terminated automatically. But I need to scan for peripherals in background mode as well and fire some local notifications when some values of particular BLE peripheral will get updated. So for implementing this feature, I need to scan and observe continuously for certain BLE devices even application is in background mode or locked screen by user. Please suggest.