Skip to main content

Overview

Project.swift is the manifest file that defines an Xcode project in Tuist. It specifies the project’s name, targets, schemes, settings, and dependencies using a declarative Swift DSL.

Location

Each Project.swift file should be placed in the directory where you want to generate the Xcode project:

Basic structure

Properties

name

String
required
The name of the project. Also used as the file name of the generated Xcode project (e.g., MyApp.xcodeproj).

organizationName

String?
default:"nil"
The name of the organization used by Xcode as copyright information in file headers.

classPrefix

String?
default:"nil"
The prefix for class files Xcode generates when you create a project or class file.

options

Options
default:".options()"
Project-level options such as automatic schemes generation, text settings, and development region.

packages

[Package]
default:"[]"
Swift Packages used by the project. Specify remote or local packages as dependencies.

targets

[Target]
required
The targets of the project. Each target represents an app, framework, library, or test bundle.

schemes

[Scheme]
default:"[]"
Custom schemes for the project. Default schemes for each target are generated automatically unless disabled in options.

settings

Settings?
default:"nil"
The build settings and configuration for the project. When nil, uses Xcode defaults.

fileHeaderTemplate

FileHeaderTemplate?
default:"nil"
The custom file header template for Xcode built-in file templates.

additionalFiles

[FileElement]
default:"[]"
Additional files to include in the project (e.g., documentation, configuration files) that aren’t part of any target.

resourceSynthesizers

[ResourceSynthesizer]
default:".default"
Resource synthesizers that generate type-safe accessors for resources like images, strings, and fonts.

Defining targets

Targets are the building blocks of your project. Each target produces a single product:

Target properties

  • name: The target’s name
  • destinations: Platforms the target supports (.iOS, .macOS, .tvOS, .visionOS, .watchOS)
  • product: The product type (.app, .framework, .staticLibrary, etc.)
  • bundleId: The bundle identifier
  • infoPlist: Info.plist configuration
  • sources: Source file patterns
  • resources: Resource file patterns
  • dependencies: Dependencies on other targets, projects, or packages

Schemes

Schemes define how to build, run, test, and archive your targets:

Dependencies

Target dependencies

Project dependencies

External dependencies (Swift Packages)

SDK dependencies

Settings

Define build settings at the project level:

Swift Packages

Include Swift Packages in your project:

Examples

Simple iOS app

App with framework and tests

Multi-platform target

With custom schemes

Best practices

Modular structure

Break large projects into multiple smaller projects for better build times and organization.

Glob patterns

Use glob patterns for sources and resources to automatically include new files.

Shared settings

Define common settings in a shared location and reference them across targets.

Test targets

Create separate test targets for unit tests and UI tests.