An option that determines whether audio from the session defaults to the built-in speaker instead of the receiver.
- iOS 6.0+
- Mac Catalyst 13.0+
You can set this option can only when using the
AVAudio category. It’s used to modify the category’s routing behavior so that audio is always routed to the speaker rather than the receiver if no other accessories, such as headphones, are in use.
When using this option, the system honors user gestures. For example, plugging in a headset causes the route to change to headset mic/headphones, and unplugging the headset causes the route to change to built-in mic/speaker (as opposed to built-in mic/receiver) when you’ve set this override.
In the case of using a USB input-only accessory, audio input comes from the accessory, and the system routes audio to the headphones, if attached, or to the speaker if the headphones aren’t plugged in. The use case is to route audio to the speaker instead of the receiver in cases where the audio would normally go to the receiver.