Transfer app data to or from other platforms using AppMigrationKit. Use when implementing system-orchestrated one-time migration between iOS and Android or another platform, building an AppMigrationExtension, packaging transportable resources with ResourcesArchiver, importing resources on the destination device, reporting import progress, handling migration errors and app group cleanup, checking MigrationStatus, or testing migration code with AppMigrationTester.
AppMigrationKit provides one-time cross-platform data transfer for app resources, letting an app export data to or import data from another platform such as Android during device setup or onboarding. The APIs are iOS 26.0+/iPadOS 26.0+ (the data-container entitlement is 26.1+) on Swift 6.3, and the guide flags it as beta-sensitive and subject to change before GM. The architecture centers on an app-extension model in three layers: an AppMigrationExtension the system invokes to export and import data, system orchestration that owns the device-to-device session, transport, and scheduling, and the containing app that checks MigrationStatus.importStatus on first launch to learn whether migration occurred and succeeded. The app never manages the network connection between devices. A types table lays out the roles of AppMigrationExtension, ResourcesExportingWithOptions and ResourcesExporting, ResourcesImporting, ResourcesArchiver, MigrationDataContainer, MigrationStatus, MigrationPlatform, MigrationAppIdentifier, and the test-only AppMigrationTester actor. Setup covers the required com.apple.developer.app-migration.data-container-access entitlement, a single-element array holding the containing app's bundle identifier, which grants the extension read access during export and write access during import, plus adding the App Extension target. The extension reaches app files through appContainer (containerRootDirectory, documentsDirectory, applicationSupportDirectory). Exporting declares resourcesSizeEstimate, resourcesVersion, and resourcesCompressible, then implements exportResources(to:request:), streaming files via ResourcesArchiver.appendItem, optionally with a custom archive path or whole directories, while making continuous progress so the system does not terminate a seemingly hung extension. It notes that cancellation errors thrown by the archiver must not be caught, and that destinationPlatform (a MigrationPlatform such as .android) can tailor exported formats. Additional sections address importing on the destination, migration status, progress tracking, and testing with AppMigrationTester, alongside common mistakes and a review checklist. Useful for building system-orchestrated migration between iOS and another platform.
It performs one-time cross-platform transfer of app resources, exporting to or importing from another platform such as Android during device setup or onboarding, all orchestrated by the system.
No. The system orchestrates the session, transport, and scheduling; the app only supplies an extension that exports and imports data and never manages the network connection.
com.apple.developer.app-migration.data-container-access, a single-element string array containing the containing app's bundle identifier, which grants the extension read access during export and write access during import.
It streams them through a ResourcesArchiver, calling appendItem(at:pathInArchive:) repeatedly for files or whole directories, while making continuous progress so the system doesn't terminate it.
The containing app checks MigrationStatus.importStatus on first launch to determine whether migration occurred and whether it succeeded.
Quick Setup:
.claude/skills/Repository
dpearson2699/swift-ios-skills