RecordScanningProcessDelegate

Methods for managing the recording of the scanning process.

func recordingOutputFileURL() -> URL

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

func recordingOutputFileURL() -> URL {
    let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
    return paths[0].appendingPathComponent("video.mov")
}

func didFinishRecording(URL)

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

func didFinishRecording(toFile fileURL: URL) {
    print("didFinishRecording: \(fileURL.absoluteURL)")
}

func didFailWithError(Error)

Tells the delegate that an error has appeared.

func didFailWithError(_ error: Error) {
    print("didFailWithError: \(error.localizedDescription)")
}

Last updated

Was this helpful?