Hi there,
i'm currently working on an iOS app that uses a combination of CoreBluetooth and CoreLocation to interact with BLE devices from the background. We want our app to wake up, after one of our beacons is detected. After that we need to start a BLE scan to receive additional informations about the device from their scan response and notifing the user about the device via a user notification.
Currently, the app always wakes up when entering our beacon region. In the console app of the connected Mac, we can see that the bluetooth scan is triggered again. But the didDiscoverPeripheral callback will never be called. We registered the `bluetooth-central` role in our `info.plist` and also specify a concrete service UUID to scan for, but still there's no response when the app is restarted. We also created a serial background queue for our CBCentralManager and registered a restore identifier.
Everything works fine when the app runs in foreground or is send to background. But after the application is killed via the task manager (double tap on home button and swipe up) the bluetooth scan cannot be started again.
This is our current test scenario:
- Launch App via XCode
- Kill app via task manager (double tap on home button and swipe up)
- Enable iBeacon device
- App receives enter region event and wakes up
- App starts bluetooth scan with concrete service UUID and without duplicates
- `centralManager(_ :, didDiscover:, advertisementData: , rssi:)` is never called
Is there something we are missing?