I was having the same issue... It appears as if Apple is now requiring the use of AVAudioSession
prior to using the AVAudioRecorder
. I couldn't find any documentation on this change in requirement, however the recording portion of my app is now working.
All I did was create an audioSession
, set the category, and set it to be active. I did this prior to calling prepareToRecord
and I tried it after the call to prepareToRecord...
both ways worked.
I hope this fixes your problem!
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
[audioSession setActive:YES error:nil];