AVCaptureDevice default Audio device is nil despite microphone permission

Viewed 128

Some iPhone 7 plus devices (and only these device models) are throwing an error

let audioDevice = AVCaptureDevice.default(for: AVMediaType.audio)

  if audioDevice == nil {
        showError("Nil Audio Device") //UIAlertController display error text
  } 

I can not reproduce it on my iPhone 7 plus obviously. Only few users complained. I need to understand under what circumstances could this be nil? Assuming user gave permission for Microphone which is verified.

0 Answers
Related