AVCapture default audio device is nil on some iPhone 7 plus devices

Some iPhone 7 plus (and only these device models) are throwing an error
Code Block
let audioDevice = AVCaptureDevice.default(for: AVMediaType.audio)
if audioDevice == nil {
showError("Nil Audio Device")
}



I need to understand under what circumstances could this be nil? Assuming user gave permission for Microphone.

I also tried AVCaptureDiscoverSession
Code Block
    private var audioDiscoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: [AVCaptureDevice.DeviceType.builtInMicrophone], mediaType: .audio, position: .unspecified)


And tried to grab the first device. Still, it is nil. Why?
AVCapture default audio device is nil on some iPhone 7 plus devices
 
 
Q