User guide

Allows audio
input
(recording) and
output
(playback)
Interrupts
non-mixable
apps audio
Silenced by
the
Ring/Silent
switch and
by screen
locking
see
note
Category identifiers
Input onlyYesNo
(recording
continues
with the
screen
locked)
AVAudioSessionCategoryRecord
Output onlyYesYesAVAudioSessionCategorySoloAmbient
Note: For your app to continue playing audio when the Ring/Silent switch is set to silent and the
screen is locked, make sure the UIBackgroundModes audio key has been added to your apps
Info.plist file. This requirement is in addition to your using the correct category.
Table B-2 provides a list of modes and what categories each mode can be used with.
Table B-2 Modes and associated categories
Compatible categoriesMode identifiers
AllAVAudioSessionModeDefault
AVAudioSessionCategoryPlayAndRecordAVAudioSessionModeVoiceChat
AVAudioSessionCategoryPlayAndRecordAVAudioSessionModeGameChat
AVAudioSessionCategoryPlayAndRecord
AVAudioSessionCategoryRecord
AVAudioSessionModeVideoRecording
AVAudioSessionCategoryPlaybackAVAudioSessionModeMoviePlayback
AVAudioSessionCategoryPlayAndRecord
AVAudioSessionCategoryRecord
AVAudioSessionCategoryPlayback
AVAudioSessionModeMeasurement
Audio Session Categories and Modes
2014-09-17 | Copyright © 2014 Apple Inc. All Rights Reserved.
48