Ios App Websocket Background

The app tracks my location and when my position changes it emits a message to a server.
Ios app websocket background. Apple has finally added support in urlsession and for lower level. I have the location tracking working in the background with react native location but i can t get socket io to work. If the socket connection is lost the server sends an email to notify me.
Ios simulator running on mac does allow us to use localhost. The client sends a pretty standard http get request to. The handshake app is the web part in websockets.
But after this time the socket connection is destroyed. Websocket is a two way communication protocol or persistence communication channel over tcp connection an extremely powerful protocol leveraged by numerous games apps with chat functionality and real time apps such as stock tickers. In ios only specific app types are allowed to run in the background.
Even if my application is not an audio app. Depending on cpu load radios might be second sometimes when you ve got an active socket the radios are on. I saw lots of tricky things like enable audio mode background or voip.
Yeah this is an issue. First why it does this. Websockets in ios 13 macos 10 15 tvos 13 watchos 6 and mac catalyst have gained first class citizen status in networking stack.
The three biggest power users in your phone are in order. But a persistant websocket. Is there any way to keep websocket connections when the app is in the background or the phone is locked.