Instance Method


Selects the preferred directivity configuration for the data source.


func setPreferredPolarPattern(_ pattern: AVAudioSession.PolarPattern?) throws



The directivity configuration to be used.

Return Value

true if a request was successfully made, or false otherwise.


Requests a change to the selected polar pattern; to determine whether the change takes effect, use the selectedPolarPattern property.

If the data source and its owning port are in use, using this method to change the directivity configuration will likely result in a route reconfiguration.

Set a preferred polar pattern only after setting the audio session’s category and mode and activating the session.

See Also

Configuring Microphone Directivity

var selectedPolarPattern: AVAudioSession.PolarPattern?

The directivity configuration currently in use by the data source.

var supportedPolarPatterns: [AVAudioSession.PolarPattern]?

The set of directivity configurations supported by the data source.

var preferredPolarPattern: AVAudioSession.PolarPattern?

The preferred directivity configuration for the data source.

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