Enabling Background Audio

Configure your app to continue playing audio when it goes into the background.


iOS and tvOS apps require you to enable certain capabilities for some background operations. A common capability required by playback apps is to play background audio. With this capability enabled, your app’s audio can continue when users switch to another app or when they lock their iOS devices. This capability is also required for enabling advanced playback features like AirPlay streaming, and Picture in Picture playback in iOS.

The simplest way to configure these capabilities is by using Xcode. Select your app’s target in Xcode and select the Capabilities tab. Under the Capabilities tab, set the Background Modes switch to ON and select the “Audio, AirPlay, and Picture in Picture” option under the list of available modes.

Xcode capabilities window with Audio, AirPlay, and Picture in Picture option selected and Background Modes switch set to ON.

With this mode enabled and your audio session configured, your app is ready to play background audio.

See Also

Working with Background Audio

Playing Audio from a Video Asset in the Background

Continue playing audio from a video asset when the video moves into the background.

Controlling Background Audio

Support controlling background audio from the Control Center and iOS Lock screen.