<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppMigrationKit",
  "identifier" : "/documentation/AppMigrationKit/ResourcesExportingWithOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppMigrationKit"
    ],
    "preciseIdentifier" : "s:15AppMigrationKit29ResourcesExportingWithOptionsP"
  },
  "title" : "ResourcesExportingWithOptions"
}
-->

# ResourcesExportingWithOptions

A protocol for exporting transportable resources in an archive format.

```
protocol ResourcesExportingWithOptions : AppMigrationExtension
```

## Overview

Conform to this protocol in your app extension to export transportable resources: files on disk that can you can copy as-is to the destination device without converting to an intermediate transport format.

Only use this approach when your app’s files require no changes before exporting.
If you convert files locally to an intermediate transport format, export might fail if there’s not enough free space on the file system.

During export, the system prevents launching your app and any of its extensions.
This ensures the migration system has exclusive access to the app contents.
The export process may also archive, compress, or de-duplicate the files during transport.

Make continuous progress while exporting by repeatedly calling the archiver’s [`appendItem(at:pathInArchive:)`](/documentation/AppMigrationKit/ResourcesArchiver/appendItem(at:pathInArchive:)) method as each resource is ready.
If the framework determines that your extension is hung, it may terminate the extension without migrating the app’s data to the destination.

## Topics

### Exporting resources

[`func exportResources(to: sending ResourcesArchiver, request: MigrationRequestWithOptions<Self.OptionsType>) async throws`](/documentation/AppMigrationKit/ResourcesExportingWithOptions/exportResources(to:request:))

Exports resources from the app, in response to a request from the migration system.

[`class ResourcesArchiver`](/documentation/AppMigrationKit/ResourcesArchiver)

An object your app uses to archive resources during an export operation.

[`struct MigrationRequestWithOptions`](/documentation/AppMigrationKit/MigrationRequestWithOptions)

An object that exposes properties of the migration request.

### Declaring resource properties

[`var resourcesSizeEstimate: Int`](/documentation/AppMigrationKit/ResourcesExportingWithOptions/resourcesSizeEstimate)

The estimated size of all resources to export, in bytes.

[`var resourcesVersion: String`](/documentation/AppMigrationKit/ResourcesExportingWithOptions/resourcesVersion)

A property that identifies the version of the format the export uses.

[`var resourcesCompressible: Bool`](/documentation/AppMigrationKit/ResourcesExportingWithOptions/resourcesCompressible)

A property that indicates whether the archiver attempts to compress the resources passed to it.

### Declaring export options

[`associatedtype OptionsType : CaseIterable, Hashable, RawRepresentable, Sendable`](/documentation/AppMigrationKit/ResourcesExportingWithOptions/OptionsType)

A type that indicates the options supported by the destination device.

## Relationships

### Inherits From

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`AppExtension`](/documentation/ExtensionFoundation/AppExtension)

[`AppMigrationExtension`](/documentation/AppMigrationKit/AppMigrationExtension)

### Inherited By

[`ResourcesExporting`](/documentation/AppMigrationKit/ResourcesExporting)

---

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)