Hello! I have an beacon (this. device doesn't support pair) that should work as SOS button, but required option is that the device should work for a long time in background. Sequence algorithm:
- BLE device send trigger to nearest device
- iPhone should receive this trigger (in background) then do network request
I can't find right solution cz the BGTask has 30 sec limit
You don't need the app to be running in the background to accomplish something like what you are describing. A properly architected app using CoreBluetooth along with a properly configured accessory should be able to wake up in response to events from the accessory as necessary.
This document should help explain your options: https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/CoreBluetoothBackgroundProcessingForIOSApps/PerformingTasksWhileYourAppIsInTheBackground.html