Instance Method

setAggregatedIOPreference(_:)

Sets the audio session's aggregated I/O configuration preference.

Declaration

func setAggregatedIOPreference(_ inIOType: AVAudioSession.IOType) throws

Parameters

inIOType

The aggregated I/O preference that you want to use.

Return Value

true if the preference was successfully changed, or false otherwise.

Discussion

Starting with iOS 10, AVCaptureSession has changed its default audio input configuration on iPhones and iPads that support the Live Photos feature.

Apps using AVCaptureSession, in its default audio input configuration (usesApplicationAudioSession = true, automaticallyConfiguresApplicationAudioSession = true), that need to guarantee the same behavior as previous versions of iOS should opt-out of this new behavior by setting the aggregated I/O preference to AVAudioSession.IOType.aggregated.

Apps not using of AVCaptureSession, or using AVCaptureSession in its non-default configuration can ignore this preference. In these cases there is no change in behavior from previous versions of iOS.

Topics

Data Types

enum AVAudioSession.IOType

Constant values used to specify the audio session's aggregated I/O behavior.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software