We are developing a SwiftUI iOS app which behaves as a client to a MJPEG server on a local network. This means that our app should read images sent from a special hardware we are developing using HTTP protocol. The testing is working fine, but our concern is that when the app goes to the background or the phone is locked, the HTTP connection gets closed after one minute. However, we need to have this HTTP connection alive all the time because we are developing a safety monitoring app that should continue its monitoring state even when the phone is locked. We are constantly running object detection AI algorithm on the transferred images from the hardware. Is there a solution to our concern. Could we have example code to a solution?
iOS app acting as MJPEG client in the background
I’m going to start you off with iOS Background Execution Limits. Please read that and then reply here if you have follow-up questions.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Thank you for your reply. Could we have the iOS app playing in the background the HTTP Live Stream (HLS) acting as a client to a certain server on the same local network. In addition, could we parse the individual images from this stream so to analyze them. Thanks.