---
title: "exportPackage(to:options:)"
framework: usdkit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "usdkit/usdstage/exportpackage(to:options:)-6s2wk"
---

# exportPackage(to:options:)

Packages the stage into a USDZ archive.

## Declaration

```swift
func exportPackage(to url: URL, options: USDStage.ExportOptions = []) throws
```

## Discussion

Discussion The stage and its referenced assets are bundled into a USDZ file. Layer structure is preserved — this operation does not flatten. Throws an error if the extension is not .usdz.

## See Also

### Exporting the stage

- [exportPackage(to:options:)](usdkit/usdstage/exportpackage(to:options:)-2x7yr.md)
- [exportFlattened(to:)](usdkit/usdstage/exportflattened(to:)-98kpc.md)
- [exportFlattened(to:)](usdkit/usdstage/exportflattened(to:)-6717d.md)
- [USDStage.ExportOptions](usdkit/usdstage/exportoptions.md)
