AVAudioSession currentRoute.outputs audio product port, uid

We plan to use “AVFoundation” framework, and fetch current route of .bluetoothA2DP by using AVAudioSession.sharedInstance().currentRoute.outputs to get uid of our audio headset.

Then, compare audio port, uid with the one advertised in BLE manufacturer data by using CoreBluetooth framework to ensure connected audio device.

Does anyone have experience of using this method in your app that works with Bluetooth audio devices?