User guide

Update the UI to indicate that audio has paused when it is interrupted. Do not deactivate the audio session
or pause/stop player objects.
Check for the presence of the AVAudioSessionInterruptionOptionKey constant and honor its value
after an end interruption. Don’t start playing audio again unless the app was playing prior to the
interruption.
Pause the audio session due to a route change caused by an unplug event, but keep the audio session
active.
Assume the apps audio session is inactive when it transitions from a suspended to foreground state.
Reactive the audio session when the user presses the play button.
Ensure that the audio UIBackgroundModes flag is set.
Use the AVAudioSessionCategoryPlayAndRecord category instead of the
AVAudioSessionCategoryRecord category.
Use a background task instead of streaming silence to keep the app from being suspended.
Use a MPVolumeView object for the volume slide and route picker.
Ask the user for permission to record input using the requestRecordPermission: method. Don’t rely
on the iOS to prompt the user.
Register for remote control events.
Audio Guidelines for VoIP and Chat Apps
VoIP and chat apps require that both input and output routes are available. These types of apps use the
AVAudioSessionCategoryPlayAndRecord category and do not mix with other apps.
Apple recommends the following guidelines:
Only activate an audio session when the user answers or initiates a call.
Update the UI to reflect the call’s audio has been interrupted after an interruption notification.
Do not activate an audio session after an interruption until the user answers or initiates a call.
Deactivate the audio session after a call ends using the
AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation constant.
Ignore all route changes unless the app specifically needs to pay attention to them.
Ensure that the audio UIBackgroundModes flag is set.
Use a MPVolumeView object for the volume slide and route picker.
Audio Guidelines By App Type
Audio Guidelines for VoIP and Chat Apps
2014-09-17 | Copyright © 2014 Apple Inc. All Rights Reserved.
44