how to detect what bluetooth device audio is coming out of

I have two BluetoothHFP bluetooth devices connected to my iPad(bluetoothA2DP and bluetoothLE) and I need to detect which one is currently getting the audio. Below is the code I am using to detect what bluetooth is available : let currentRoute = audioSession.currentRoute for description in currentRoute.outputs { if convertFromAVAudioSessionPort(description.portType) == convertFromAVAudioSessionPort(AVAudioSession.Port.bluetoothA2DP) { //Do Something break…

Details