<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVAssetExportSession/export(to:as:isolation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "s:So20AVAssetExportSessionC12AVFoundationE6export2to2as9isolationy10Foundation3URLV_So10AVFileTypeaScA_pSgYitYaKF"
  },
  "title" : "export(to:as:isolation:)"
}
-->

# export(to:as:isolation:)

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

```
@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 <doc://com.apple.documentation/documentation/UniformTypeIdentifiers/UTType-swift.struct/preferredFilenameExtension> property of <doc://com.apple.documentation/documentation/UniformTypeIdentifiers/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`](/documentation/AVFoundation/AVAssetExportSession/supportedFileTypes).

You can monitor the status of an export by calling the [`states(updateInterval:)`](/documentation/AVFoundation/AVAssetExportSession/states(updateInterval:)) method.

> Note:
> You can cancel an in-progress export by calling <doc://com.apple.documentation/documentation/Swift/Task/cancel()> on the <doc://com.apple.documentation/documentation/Swift/Task> or parent task that initiated the operation.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)