Contents

finishWriting(completionHandler:)

Marks all unfinished inputs as finished and completes the writing of the output file.

Declaration

func finishWriting(completionHandler handler: @escaping  @Sendable () -> Void)
func finishWriting() async

Parameters

  • handler:

    A completion handler the system invokes when it finishes writing. Determine the success or failure of the writing session by querying the asset writer’s Status Swift.property property value.

Discussion

To ensure the asset writer finishes writing all samples, call this method only after all calls to append(_:) or append(_:withPresentationTime:) return.

See Also

Managing writing sessions