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 query the audio session’s
current property to get information about the active set of input and output ports. To change the current audio routing, call the
set method. 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.