Unable to switch to speaker output when bluetooth headsets are connected
I'm trying to allow for a toggle between bluetooth headsets (airpods in my case) and the phone speaker, using AVAudioSession . I initialize my session as so: AVAudioSessionCategoryOptions options = (AVAudioSessionCategoryOptionAllowBluetooth | AVAudioSessionCategoryOptionDefaultToSpeaker); NSError *error = nil; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:options error:&error]; Then I try to alternate between output modes as so: -(void)setIncomingSoundMode:(IncomingSoundMode)incomingSoundMode{ [self removeAudioRouteChangedObserver]; [NNLogger