Activates or deactivates your app’s audio session using the specified options.
- iOS 6.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
YESto activate your app’s audio session, or
NOto deactivate it.
An integer bit mask containing one or more constants from the
Session Set Active Options
On input, a pointer to an error object. If an error occurs, the framework sets the pointer to an
NSErrorobject that describes the error. If you don’t want error information, pass in
YES if the session’s active state was changed successfully; otherwise
If another active audio session has higher priority than yours (for example, a phone call), and neither audio session allows mixing, attempting to activate your audio session fails. Deactivating an audio session that has running audio objects stops them, deactivates the session, and return an