0 Replies
      Latest reply on Oct 4, 2019 4:52 AM by asendra
      asendra Level 1 Level 1 (0 points)

        Happens both on iOS 12 and 13.

        I have bluetooth-central correctly added on my Info.plist

        I'm specifying a list of service UUIDs

        What 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)