I have an app that is keeping an active connection to a BLE device. The BLE device is sending data from time to time to the app, and I want the app to send this data to a server.
Note the app can be in foreground, background, the iPhone locked, or any possible state.
What I see is that if the app is in the background (after a while), when iOS awakes the app upon a new BLE update from my hardware device, the network request fails instantaneously (like it's not granting network access).
Does anybody know how to approach this issue? note that UIBackgroundTask
doesn't seem to work as they can only be requested from the foreground (right?), and in my case, the app is already in the background when the BLE update hits the phone.
Any ideas?