<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppMigrationKit",
  "identifier" : "/documentation/AppMigrationKit/ResourcesImporting/importResources(at:request:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppMigrationKit"
    ],
    "preciseIdentifier" : "s:15AppMigrationKit18ResourcesImportingP06importD02at7requesty10Foundation3URLV_AA0D13ImportRequestVtYaKF"
  },
  "title" : "importResources(at:request:)"
}
-->

# importResources(at:request:)

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

```
func importResources(at url: URL, request: ResourcesImportRequest) async throws
```

## Parameters

`url`

A URL that refers to a directory containing the resources to import.

`request`

A request object that describes the source of the migration.

## Discussion

Implement this method in your app extension to import files to your app from the source device.
You can accomplish this task by moving all files from the directory indicated by `url` to an appropriate location for your app, such as the documents directory.

> Important: AppMigrationKit coerces any error thrown from this method into an <doc://com.apple.documentation/documentation/Foundation/NSError> instance. The framework persists this error so it can provide it to your app on its first launch. If your error can’t convert to an `NSError`, AppMigrationKit provides a generic error to the app instead.

---

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)