TL;DR - AVAudioSession will fire AVAudioSessionMediaServicesWereLostNotification when a bluetooth port is specified with AVAudioSession.setPr
AVAudioSession
AVAudioSessionMediaServicesWereLostNotification
AVAudioSession.setPr