Skip to content


func recordingOutputFileURL() -> URL

Asks the delegate for a URL to use for the output file.

func recordingOutputFileURL() -> URL {
    let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
    return paths[0].appendingPathComponent("")
- (NSURL *)recordingOutputFileURL {
    NSArray *paths = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask];
    return [paths[0] URLByAppendingPathComponent:@""];

func didFinishRecording(URL)

Tells the delegate that the recording is finished and a URL of the output file can be obtained.

func didFinishRecording(toFile fileURL: URL) {
    print("didFinishRecording: \(fileURL.absoluteURL)")
- (void)didFinishRecordingToFile:(NSURL *)fileURL {
    NSLog(@"didFinishRecording: %@", [fileURL absoluteURL]);

func didFailWithError(Error)

Tells the delegate that an error has appeared.

func didFailWithError(_ error: Error) {
    print("didFailWithError: \(error.localizedDescription)")
- (void)didFailWithError:(NSError *)error {
    NSLog(@"didFailWithError: %@", [error localizedDescription]);