Tuesday, June 30, 2026
HomeiOS Developmentswift - iOS 12.4 AVAudioRecorder crash CrashIfClientProvidedBogusAudioBufferList

swift – iOS 12.4 AVAudioRecorder crash CrashIfClientProvidedBogusAudioBufferList

[ad_1]

I am making an attempt to grasp why AVAudioRecorder.report() crashing on iOS 12.4 simulator (I haven’t got 12.4 system now to test)

Cannot discover virtually any data about this particular crash

Right here is my AVAudioRecorder setup:

func startRecording() {
    let dirPath =  NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] as String
    let recordName = "report.wav"
    audioURL = URL(fileURLWithPath: dirPath + "/" + recordName)

    do {
        let recorder  = attempt AVAudioRecorder(url: self.audioURL, settings: [:])
        attempt audioSession.setCategory(.playAndRecord, choices: .defaultToSpeaker)
        attempt audioSession.setActive(true)
        audioRecorder = recorder
        audioRecorder.isMeteringEnabled = true
        audioRecorder.delegate = self
        audioRecorder.prepareToRecord()
        audioRecorder.report()
    } catch {
        self.finishRecording(success: false)
        print(error)
    }
}

I additionally test permissions earlier than report:

audioSession.requestRecordPermission { granted in
            if granted {
                self.recordTapped()
            } else {
                print("not granted")
            }
        }

All the data I get from error stack hint:

enter image description here

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments