Sets the audio session category with the specified options.
- iOS 6.0+
- tvOS 9.0+
- watchOS 2.0+
true if the audio session category and options were set successfully, or
The audio session's category defines how the app intends to use 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.
The behavior of certain categories can be tailored by specifying a mask of category options. Specifying an unsupported option for the indicated category results in an error. See
AVAudio for category compatibility.