Are there are “rules” or limitations imposed by Apple regarding UDP connections? I’m asking because my app connects to a UDP group upon startup and this UDP connect is used to synchronize changes between iOS, Desktop and Web apps. It works great when it’s working.
However, sometime after the phone locks or the app is no longer the active app, etc., the UDP connection stops working. I have to force quit the app and restart it in order to get it back. I have code when the app becomes active to check if the socket is connected and if not to connect it. But that doesn’t seem to make a difference. I am never able to duplicate this behavior in the simulator so I can’t debug and see what’s going on.
I know there was an issue when the current mobile framework first came out that UDP sockets would cause the app to crash after unlocking the phone (feedback://showreport?report_id=62875). But that has been fixed. Still I am wondering if Xojo is somehow dropping the connection but the app still thinks its connected when it’s not.
Or is there some “rule” that Apple imposes preventing apps in the background from being connected to UDP sockets?
Any ideas anyone? I’d love to keep handling UDP packets when in the background but it just doesn’t seem to work well…