A class you use to test your extension's import code.
Use the ``AppMigrationTester/importController`` property to obtain an instance of this class, then use its methods to call the import-related code of your app migration extension.
final func registerImportCompletion(with status: MigrationStatus) async throws
Tells your app that import completed with a given status.
Use this method in a unit test to evaluate how your app handles a post-migration launch.
You can uses success or failure statuses to see the different messages presented to the person using the app.
- Parameter status: A status value that indicates success or failure of the import.
Tells the migration extension to begin importing transportable resources into the app extension.
Clean your app state before starting an import test, since the app extension runs on a clean app state.
In particular, remove any files you previously wrote to the app container and ensure it's empty.
This simulates how the extension normally runs during a migration.
- Parameters:
- extractedResourceURL: A file URL pointing to a directory that contains the resources to import.
- importRequest: An optional migration request instance to pass to the app extension's import method. If this value is `nil`, the framework uses a default request. This value defaults to `nil`.
- progress: An optional <doc://com.apple.documentation/documentation/foundation/progress> object the extension uses to report its progress back to the unit test. This value defaults to `nil`.