Recording Audio
Capture microphone input to a file.
Recording with AVAudioRecorder
AVAudioRecorder captures audio from the microphone to a file with minimal setup—ideal for voice memos and simple recorders.
import AVFoundationMicrophone Permission
Recording requires user permission. Add NSMicrophoneUsageDescription to Info.plist and request access before recording.
AVAudioApplication.requestRecordPermission { granted in
if granted { /* start recording */ }
}