I would like to share my specific use case and seek your guidance on implementing it effectively within iOS:
We are developing an iOS application that may run simultaneously on multiple devices near each other. The core functionality involves continuous Bluetooth Low Energy (BLE) scanning to detect peripherals (beacons) in the range of a central device. The scanning needs to function seamlessly across the following states:
• Foreground
• Background
• Locked mode (when the device is locked)
Here are the detailed requirements:
1. Scanning Behavior:
• The central device should continuously scan for nearby BLE peripherals (beacons).
• If a new peripheral comes into range, the application should capture its data, including:
• Device Name
• MAC Address
• Payload Data
• RSSI (Signal Strength)
2. Peripheral Out-of-Range Handling:
• If a detected peripheral (beacon) moves out of range, it should automatically be removed from the populated list displayed on the app.
3. Peripheral Reappearance:
• If a peripheral (beacon) that moved out of range comes back into range, the application should detect it again and repopulate the list with updated data seamlessly.
4. Application State:
• This behavior (scanning, detection, and updating) should work regardless of the app’s state:
• Foreground
• Background
• Device Locked
FYI, we are using Custom Ruuvi beacons
Given the above requirements, I would greatly appreciate any guidance, suggestions, or best practices to implement this use case efficiently while adhering to iOS background execution and Bluetooth limitations.
Post
Replies
Boosts
Views
Activity
I have a solution where my application should scan the Bluetooth enabled Beacon devices in the foreground, background, locked mode for the iphone.
Currently we have built the project, which is working fine in foreground mode. We have tried exploring multiple options to enable the feature in background and locked mode.
As of now, we have come up with the solution which implements Picture in Picture mode in the application and once the application is minimized. The PIP window opens which solves our problem. But the problem stays with locked mode. The scanning is not working in locked mode.
So can we know how the bluetooth scanning will work in background and locked mode. Please also mention the alternative solutions to the problem statement if background and locked mode scanning is not possible.
I have attached the project source code for reference.
This project is being built for Google, so it is bit urgent.
Can I expect a quick response to this query?