Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You are writing an application that plays audio files (such as a music player) and you would like the audio files to be played even if your application is running in the background.
Create a new array key in your application’s main .plist file. Set the name of the key to
UIBackgroundModes. Add the value
audio to this new key. Here is an
example of the contents of a .plist file with the aforementioned key and
value added:
<dict>
...
...
...
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
...
...
...
</dict>
Now you can use the AV Foundation to play audio files, and your audio files will be played even if your application is in the background.