Skip to main content
Tuist generates Xcode projects from Swift manifest files, eliminating manual .pbxproj maintenance and enabling team-wide consistency.

Why Generated Projects?

Manually maintaining Xcode project files creates several challenges:

Merge Conflicts

.pbxproj files are XML-based and conflict-prone when multiple developers modify projects

Inconsistency

Different developers may configure settings differently, leading to build issues

Hard to Review

Changes to .pbxproj are difficult to review in pull requests

Configuration Drift

Project settings can drift over time without clear documentation
Tuist solves these problems by treating manifests as the single source of truth and generating projects on-demand.

Generation Flow

When you run tuist generate, here’s what happens:
1

Manifest Discovery

Tuist searches for manifest files starting from the current directory:
The CLI walks up the directory tree to find configuration and workspace definitions.
2

Manifest Loading

Each manifest is:
  1. Compiled as a Swift executable
  2. Executed in a sandboxed environment
  3. Decoded from JSON output
3

Graph Construction

Tuist builds a complete dependency graph:
  • Resolves all target dependencies
  • Validates no circular dependencies exist
  • Determines correct build order
  • Links external packages
Use tuist graph to visualize your project’s dependency graph
4

Project Generation

The TuistGenerator module creates Xcode project files:
  • Writes .xcodeproj package structure
  • Generates project.pbxproj with all targets
  • Creates schemes for each target
  • Applies build settings and configurations
5

Scheme Generation

Schemes are automatically generated or customized:
  • Default scheme per target
  • Custom schemes from manifest
  • Build actions and test targets
  • Run configurations

What Gets Generated?

A complete .xcodeproj package containing:
Generated elements:
  • All targets (apps, frameworks, tests)
  • Build phases (sources, resources, scripts)
  • Build configurations (Debug, Release)
  • Build settings
  • File references
  • Groups and folder structure

Generation Options

Customize generation behavior in Tuist.swift:

Project Options

Per-project generation settings in Project.swift:

Caching Generated Projects

Tuist caches generation results to speed up subsequent runs:
How it works:
  • Tuist hashes manifest content and dependencies
  • Caches compiled manifest executables
  • Reuses cached results when manifests haven’t changed
Cache location:

Regeneration Workflow

1

Make Changes

Edit your manifest files:
Project.swift
2

Regenerate

Run Tuist generate:
Or use the --no-open flag to skip opening Xcode:
3

Xcode Updates

Xcode automatically detects changes and reloads the project.
Don’t manually edit .xcodeproj files - your changes will be lost on next generation!

Best Practices

Add generated files to .gitignore:
.gitignore
This ensures:
  • No merge conflicts in project files
  • Smaller repository size
  • Team members generate locally
Create reusable manifest helpers:
Tuist/ProjectDescriptionHelpers/Target+Templates.swift
Project.swift
Add a pre-commit hook to validate manifests:
.git/hooks/pre-commit
Add a README explaining your project structure:
README.md

Troubleshooting

Symptoms: tuist generate exits with an errorSolutions:
  1. Check manifest syntax:
  2. Clear cache:
  3. Enable verbose logging:
Symptoms: Generation takes longer than expectedSolutions:
  1. Check manifest cache:
  2. Profile generation:
  3. Simplify complex globs:

Next Steps

Manifests

Learn about Project.swift and manifest files

Workspaces

Organize multiple projects in workspaces

Architecture

Understand Tuist’s internal architecture

Settings

Configure build settings and options