Overview
Thetuist migration command provides a set of utilities to assist in migrating existing Xcode projects to Tuist. These tools help you analyze your current project structure and extract configuration for easier migration.
Usage
Subcommands
tuist migration settings-to-xcconfig
Extracts build settings from a project or target into an .xcconfig file.
tuist migration check-empty-settings
Checks if the build settings of a project or target are empty. Exits unsuccessfully if settings are not empty.
tuist migration list-targets
Lists the targets of a project sorted by number of dependencies.
Options (for settings-to-xcconfig)
The path to the Xcode project.
Short form of
--xcodeprojPath.The path to the
.xcconfig file where build settings will be extracted.Short form of
--xcconfigPath.The name of the target whose build settings will be extracted. When not passed, it extracts the build settings of the project.
Short form of
--target.Options (for check-empty-settings)
The path to the Xcode project.
Short form of
--xcodeprojPath.The name of the target whose build settings will be checked. When not passed, it checks the build settings of the project.
Short form of
--target.Options (for list-targets)
The path to the Xcode project.
Short form of
--xcodeprojPath.Examples
Extract project build settings
.xcconfig file.
Extract target build settings
MyApp target.
Check if settings are empty
MyApp target has no build settings defined directly.
List targets by dependencies
Migration workflow
A typical migration workflow using these utilities:1. Analyze your project
Start by understanding your project structure:2. Extract build settings
For each target, extract build settings to.xcconfig files:
3. Create Tuist manifests
CreateProject.swift files referencing the extracted .xcconfig files:
4. Verify empty settings
After moving settings to.xcconfig files and Tuist manifests, verify the original Xcode project has no settings:
Migration strategies
Incremental migration
Migrate one target at a time, starting with:- Leaf targets: Targets with no dependencies
- Framework targets: Reusable components
- App targets: Main applications last
list-targets to identify the best order.
Settings organization
Organize extracted settings by:- Shared settings: Common to all targets
- Target-specific settings: Unique to each target
- Configuration-specific: Debug vs. Release
Gradual transition
You can maintain both Xcode projects and Tuist manifests during migration:- Extract settings to
.xcconfigfiles - Reference
.xcconfigfiles in both Xcode and Tuist - Gradually move build logic to Tuist
- Verify with
check-empty-settings - Remove Xcode project when fully migrated
Best practices
Start small
Begin with leaf targets that have no dependencies for easier migration.
Extract settings
Move build settings to
.xcconfig files for better version control.Verify migration
Use
check-empty-settings to ensure complete migration.Incremental approach
Migrate one target at a time rather than the entire project at once.
Common migration patterns
Extracting compiler flags
.xcconfig files extracted by settings-to-xcconfig include compiler flags like: