Information about the capabilities of the port and the hardware channels it supports.
- iOS 6.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
A port description object describes a single input or output port associated with an audio route.
Examples of audio ports include a device’s built-in speaker, a microphone on a wired headset, and a Bluetooth device supporting the Advanced Audio Distribution Profile (A2DP).
You can use port descriptions with the shared
To get information about the set of input and output ports currently in use. (See
To make changes to audio routing. (See
Preferred Input: error:
For example, on a device with a wired headset attached, the audio session’s
available array may contain two port descriptions: one for the headset microphone and one for the device’s built-in microphone. You can use the audio session’s
set method to select the headset or built-in microphone for audio input.