Hi, let us explain the situation we have:
- We have a macOS server app which happens to be/act as a QUIC server (this setup is for a live demo).
- Once the server receives a streaming request from the client, server starts to send a bunch of QUIC streams to the client.
- The server needs to run on a macbook pro for the live demo and everything works fine, now when we click on a different app (the server app looses focus) the server app goes to background state and the network activity just stops going from 90MB/s to almost zero, but when we click on the server app again, the network activity goes back to 90MB/s and it continues normally.
- We understand this is the OS taking some decisions by managing resources efficiently.
Question: Kindly let us know which options do we have to keep the server app QUIC networking tasks continuously running, even if it is not on the foreground (basically for it to behave like an actual server/service)?
Thanks in advance
Question: Kindly let us know which options do we have to keep the server app QUIC networking tasks continuously running, even if it is not on the foreground (basically for it to behave like an actual server/service)?
Which framework/architecture is the app written with (AppKit/macCatalyst/SwiftUI/iOS App compatibility)?
The range of possibilities (and solutions) depend on your answer, but my first thought from your overall description is that your app is that you're running into App Nap. The initial section is focused on extending App Nap, but the later section "Prioritize Work at the App Level" describes how you can use NSProcessInfo to inform the system of what your app is doing, preventing App Nap.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware