Sets the audio session’s category.
- iOS 3.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The category to apply to the audio session. See
AVAudiofor supported category values.
true if the audio session category was set successfully; otherwise,
The audio session’s category defines how the app uses audio. Typically, you set the category before activating the session. You can also set the category while the session is active, but this results in an immediate route change.