Contents

export(to:as:isolation:)

Exports the asset to the output location in the specified file type.

Declaration

@backDeployed(before: macOS 26.0, iOS 26.0, tvOS 26.0, visionOS 26.0)
final func export(to url: URL, as fileType: AVFileType, isolation: isolated (any Actor)? = #isolation) async throws

Parameters

  • url:

    An output location to write the exported media. You can use the Preferredfilenameextension property of Uttype Swift.struct to determine an appropriate file extension for the specified file type.

  • fileType:

    The type of file for the session to write.

  • isolation:

    The isolation context.

Discussion

This method throws an error if you cancel the export or you specify a file type value that isn’t contained in the session’s supportedFileTypes.

You can monitor the status of an export by calling the states(updateInterval:) method.

See Also

Exporting media