Is there any way to let MQTT function in the background? I observed that when the phone goes to sleep, the MQTT connection disconnects. It does recover somewhat gracefully when the phone wakes up, but I need the connection to be maintained and data published (and possibly received) while in the background. Has anyone had success with this? Since MQTT is essentially using a TCP socket connection, my question can be extend to TCP connections.
I know that you can keep background file transfers and location updates going with:
#PlistExtra: <key>UIBackgroundModes</key><array><string>location</string></array>
#PlistExtra: <key>UIBackgroundModes</key><array><string>fetch</string></array>
But I could not find anything similar for TCP socket connections.
I know that you can keep background file transfers and location updates going with:
#PlistExtra: <key>UIBackgroundModes</key><array><string>location</string></array>
#PlistExtra: <key>UIBackgroundModes</key><array><string>fetch</string></array>
But I could not find anything similar for TCP socket connections.