whenever the code reaches
inputNode.installTap(onBus: 0, bufferSize: 1024, format: recordingFormat) {[weak self] (buffer:AVAudioPCMBuffer, when:AVAudioTime)
, app is crashing with following error
Terminating app due to uncaught exception 'com.apple.coreaudio.avfaudio', reason: 'required condition is false: format.sampleRate == hwFormat.sampleRate'
I tired removing taps before adding another and I'm making sure I'm not adding more than one tap. what is weird is that the app is working fine with iOS less than 12, and working fine on all simulators.
it is crashing only on real devices with iOS 12. I tried searching for a solution but could't find any thing.