Instance Property


An array of input ports available for routing.


@property(readonly) NSArray<AVAudioSessionPortDescription *> *availableInputs;


An array of AVAudioSessionPortDescription objects representing audio input devices currently attached to the system and relevant to the audio session’s current category and mode. For example, if the session’s category is AVAudioSessionCategoryPlayAndRecord, the array could contain a built-in microphone and (if plugged in) a headset microphone port.

See Also

Working with Audio Routes


An object describing the current audio input and output route.


A Boolean value indicating whether an audio input path is available.


The preferred input port for audio routing.

- setPreferredInput:error:

Sets the preferred input port for audio routing.


An array of available data sources for the audio session’s current input port.


The currently selected input data source.

- setInputDataSource:error:

Selects a data source for the audio session’s current input port.


An array of available output data sources for the current audio route.


The currently selected output data source.

- setOutputDataSource:error:

Sets the output data source for an audio session.

- overrideOutputAudioPort:error:

Temporarily changes the current audio route.


The current routing policy.

- setCategory:mode:routeSharingPolicy:options:error:

Sets the session category, mode, route sharing policy, and options.

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