One Logo Pool Ball
AppMigrationKit · IOS API REFERENCE

AppMigrationTester.AppImportController

class · iOS 26.0+ · SDK 27.1

final class AppImportController

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.

Members (2)

method · iOS 26.0+

registerImportCompletion

TypeScript
registerImportCompletion(status: MigrationStatus): Promise<void>
Swift declaration
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.

method · iOS 26.0+

importResources

TypeScript
importResources(extractedResourceURL: string, importRequest?: (ResourcesImportRequest) | null, progress?: (_Foundation_Progress) | null): Promise<void>
Swift declaration
final func importResources(from extractedResourceURL: URL, importRequest: ResourcesImportRequest? = nil, progress: Progress? = nil) async throws

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`.

Skipped declarations

No declarations were skipped in this snapshot.

All AppMigrationKit types →