Adding microphone audio input to AVCaptureSession
seems to disable UIImpactFeedbackGenerator
.
let audioDevice = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeAudio)
let audioDeviceInput = try AVCaptureDeviceInput(device: audioDevice)
if self.session.canAddInput(audioDeviceInput) {
self.session.addInput(audioDeviceInput)
}
Once the audio device is removed, feedback resumes.
Is this normal behavior? Is there a way around this?
I notice the stock iOS Camera app in video mode and long-pressing on thumbnail seem to still make the feedback work. So, there has to be a way around this?