I'm currently working on an app that handle communication with a BLE device. One of my constraint is that i must connect to this device only when i have to send a command or read data. I must disconnect as soon as possible when it's done, to allow other potential users to do the same.One of the features of the app is the following :Users can enable an automatic command while the app is in the background. This automatic command triggers if the device hasn't been detected within 10 minutes.My app scans until it finds my BLE device.In order to keep it awake when i need it, i'm restarting the scan each time, because of the CBCentralManagerScanOptionAllowDuplicatesKey option ignorance.When it's detected, i'm checking if the last detection was more than 10 minutes ago. If that's the case, i connect to the device and then write into the characteristic corresponding to the service i need.The goal is to trigger this device when user come in range. It may happen a few minutes after being out of range such as a few hour