I am using socket.io
in an iOS React Native(v0.20) app
. The app tracks my location, and when my position changes it emits a message to a server. If the
iOS is fairly restrictive on the kind of processes it allows when an app is backgrounded.
There seems to be some discussion around this on the socket.io client issue tracker.
It seems someone got the socket connection to remain active if they set the background mode to audio
. YMMV
Make sure you're setting the correct values in the UIBackgroundModes section of the Info.plist file. How to do this in XCode