Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Make sure you have added the CoreAudio.framework framework to
your target file, and use the AVAudioRecorder class in the AV Foundation
framework:
NSError *error = nil;
NSString *pathAsString = [self audioRecordingPath];
NSURL *audioRecordingURL = [NSURL fileURLWithPath:pathAsString];
self.audioRecorder = [[AVAudioRecorder alloc]
initWithURL:audioRecordingURL
settings:[self audioRecordingSettings]
error:&error];
For information about the audioRecordingSettings and audioRecordingPath methods used in this
example, refer to this recipe’s Discussion.