I'm working on a video recording app, and need to be able to use a bluetooth mic as the audio input (if one is connected).
I have the following code to configure the audio input of an AVCaptureSession:
self.captureSession.usesApplicationAudioSession = YES;
self.captureSession.automaticallyConfiguresApplicationAudioSession = NO;
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionAllowBluetooth error:nil];
self.microphone = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio];
audioInput = [AVCaptureDeviceInput deviceInputWithDevice:self.microphone error:&error];
if ([self.captureSession canAddInput:audioInput])
{
[self.captureSession addInput:audioInput];
}
The problem is, the bluetooth mic never shows up as an available capture device (although it is paired properly). Printing out [AVCaptureDevice devices] results in:

So, no matter what I do, the audio is always coming from the iPad's built in mic.