Hi there, I have established a TCP connection using Apple's Network framework. It works fine when the app is running in foreground but the connection drops in background mode. I was trying to keep the connection alive in background mode using background fetch/BackgroundTasks but not getting a way to do so. Any help world be appreciated. Thanks!
The issue here isn’t whether your app is in the background, it’s whether your app gets suspended while it’s in the background. If your app remains running in the background, it’s network connections continue to work.
So your question is equivalent to “How do I remain running in the background?” and that’s a complex issue. I usually start people who ask that question off by pointing them at my iOS Background Execution Limits post.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"