Skip to main content

Overview

The tuist 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)

string
required
The path to the Xcode project.
string
Short form of --xcodeprojPath.
string
required
The path to the .xcconfig file where build settings will be extracted.
string
Short form of --xcconfigPath.
string
The name of the target whose build settings will be extracted. When not passed, it extracts the build settings of the project.
string
Short form of --target.

Options (for check-empty-settings)

string
required
The path to the Xcode project.
string
Short form of --xcodeprojPath.
string
The name of the target whose build settings will be checked. When not passed, it checks the build settings of the project.
string
Short form of --target.

Options (for list-targets)

string
required
The path to the Xcode project.
string
Short form of --xcodeprojPath.

Examples

Extract project build settings

Extracts all project-level build settings into a .xcconfig file.

Extract target build settings

Extracts build settings for the MyApp target.

Check if settings are empty

Verifies that the MyApp target has no build settings defined directly.

List targets by dependencies

Shows all targets sorted by their number of dependencies, helping you plan migration order.

Migration workflow

A typical migration workflow using these utilities:

1. Analyze your project

Start by understanding your project structure:
This shows targets sorted by dependencies. Targets with fewer dependencies are easier to migrate first.

2. Extract build settings

For each target, extract build settings to .xcconfig files:

3. Create Tuist manifests

Create Project.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:
This ensures all settings have been properly migrated.

Migration strategies

Incremental migration

Migrate one target at a time, starting with:
  1. Leaf targets: Targets with no dependencies
  2. Framework targets: Reusable components
  3. App targets: Main applications last
Use 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
Example structure:

Gradual transition

You can maintain both Xcode projects and Tuist manifests during migration:
  1. Extract settings to .xcconfig files
  2. Reference .xcconfig files in both Xcode and Tuist
  3. Gradually move build logic to Tuist
  4. Verify with check-empty-settings
  5. 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:

Framework search paths

Search paths are preserved during extraction:

Code signing settings

Code signing configuration is also extracted: