iOS 15 & 16 - AVRoutePickerView - Bluetooth to Earpiece switch is not working

Hi Team,

We are facing an issue with AVRoutePickerView, Bluetooth to Earpiece switching during in-call. This issue is not occurring in iOS 14 and below.

When the VOIP call is connected, the user switches the audio mode from Bluetooth to Earpiece and it's not switching in iOS 15 and above. We have added the Category options like AllowBluetoothA2DP for fixing some other issues. Since then Bluetooth to Earpiece switching is not happening. But same code is working fine in iOS 14 and below. Could you please provide solution for this issue or share us the cause of this issue. May help us to investigate this further.

Code: Xamarin iOS

/*Initialiser*/
AVAudioSessionCategory category = AVAudioSessionCategory.SoloAmbient;
AVAudioSessionCategoryOptions options = 0;
AVAudioSessionPortOverride port = AVAudioSessionPortOverride.None;
NSString mode = AVAudioSession.ModeDefault;

/*When VOIP call gets connected it will be true*/
if (m_active) { 
    mode = AVAudioSession.ModeVoiceChat;
    category = AVAudioSessionCategory.PlayAndRecord;
    options = AVAudioSessionCategoryOptions.AllowBluetooth;
}

/*Setting mode and category*/
AVAudioSession.SharedInstance().SetMode(mode, out err);
AVAudioSession.SharedInstance().SetCategory(category, options | AVAudioSessionCategoryOptions.DuckOthers | AVAudioSessionCategoryOptions.AllowBluetoothA2DP);
AVAudioSession.SharedInstance().OverrideOutputAudioPort(port, out err);

During the call, we are changing mode, category, and options, We are using CallKit to manage the calls, Our application call will be similar to VOIP calls.

iOS 15 & 16 - AVRoutePickerView - Bluetooth to Earpiece switch is not working
 
 
Q