miniature-air-74519
10/15/2025, 10:16 PMtall-airline-16756
10/15/2025, 10:16 PMtall-airline-16756
10/15/2025, 10:17 PMLKRTCAudioSession.sharedInstance().audioSessionDidActivate(audioSession), iOS doesn’t show the built-in receiver as a selectable output. Instead, it smartly routes audio to the receiver (earpiece) automatically when it’s appropriate, unless you specifically override it to use the speaker.
To help you make sure audio routes to the receiver during CallKit calls, here are some steps you can try:
1. Set the audio session mode to voiceChat and avoid using the defaultToSpeaker option:
let rtcConfig = RTCAudioSessionConfiguration()
rtcConfig.category = AVAudioSession.Category.playAndRecord.rawValue
rtcConfig.categoryOptions = [.allowAirPlay, .allowBluetooth, .allowBluetoothA2DP]
rtcConfig.mode = AVAudioSession.Mode.voiceChat.rawValue
1. Use the isSpeakerOutputPreferred property to prefer the receiver over the speaker:
AudioManager.shared.isSpeakerOutputPreferred = false
1. Manually configure the audio session within CallKit delegate methods:
func provider(_: CXProvider, didActivate session: AVAudioSession) {
do {
try session.setCategory(.playAndRecord, mode: .voiceChat, options: [.mixWithOthers])
} catch {
// Handle error
}
}
Following these steps should help make sure the receiver is the default audio output during your calls. If you have any questions or need more help, please don’t hesitate to reach out—I’m here to support you!
Sources: README.md | callkit/README.md | docs/types/AndroidAudioTypeOptions.html