Posts

Post not yet marked as solved
1 Replies
508 Views
Happens both on iOS 12 and 13.I have bluetooth-central correctly added on my Info.plistI'm specifying a list of service UUIDsWhat I am seeing:- If I interact with our BLE device on the foreground, I can still scan for it on background, even hours and days later, as long as I don't turn off bluetooth or restart the iOS device.- If I have never interacted with it while the app is open, or If I restart the device, or turn off bluetooth on the device, then when scanning in the background, didDiscoverPeripheral: never gets called, until I open the app, which triggers didDiscoverPeripheral: instantly.- If I use retrievePeripheralsWithIdentifiers: and iOs can return the object "cached" then I can skip the scan and connect directly, which works perfectly. But sometimes retrievePeripheralsWithIdentifiers: doesn't return the object so I can't always relay on that (And forces the user to interact with our device on the foreground first)
Posted
by asendra.
Last updated
.