Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Real-time audio application on locked device

I would like to inquire about the feasibility of developing an iOS application with the following requirements:

  1. The app must support real-time audio communication based on UDP.

  2. It needs to maintain a TCP signaling connection, even when the device is locked.

  3. The app will run only on selected devices within a controlled (closed) environment, such as company-managed iPads or iPhones.

Could you please clarify the following:

  • Is it technically possible to maintain an active TCP connection when the device is locked?

  • What are the current iOS restrictions or limitations for background execution, particularly related to networking and audio?

  • Are there any recommended APIs or frameworks (such as VoIP, PushKit, or Background Modes) suitable for this type of application?

Answered by DTS Engineer in 841968022

When it comes to networking in the background on iOS, the key factor is not whether the device is locked but rather the state of your process. If your process gets suspended, your network connections either tear or go unresponsive. As long as your process is running, all standard networking APIs work just fine.

So your question is equivalent to “How do I prevent my app from being suspended?” and there’s no single answer to that question. In general, iOS apps get suspended shortly after they move to the background. However, there are exceptions. I talk about this in some detail in iOS Background Execution Limits.

If your app is playing or recording audio, it’s possible to start an audio session in the foreground and that will keep you app from being suspended while the audio session is active. This is a standard use case for background execution, designed to facilitate apps like music players and voice recorders.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

When it comes to networking in the background on iOS, the key factor is not whether the device is locked but rather the state of your process. If your process gets suspended, your network connections either tear or go unresponsive. As long as your process is running, all standard networking APIs work just fine.

So your question is equivalent to “How do I prevent my app from being suspended?” and there’s no single answer to that question. In general, iOS apps get suspended shortly after they move to the background. However, there are exceptions. I talk about this in some detail in iOS Background Execution Limits.

If your app is playing or recording audio, it’s possible to start an audio session in the foreground and that will keep you app from being suspended while the audio session is active. This is a standard use case for background execution, designed to facilitate apps like music players and voice recorders.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Real-time audio application on locked device
 
 
Q