Tuist logo
Edit page
Getting startedProject & WorkspaceProject description helpersConfigurationTuistConfigCompatible Xcode versionsGenerationOptionTemplateStringDependenciesSet up the environmentEditing your projectsDependencies graphManaging versionsFrequently asked questions
Contributors

Configuration

Tuist can be configured through a TuistConfig.swift manifest. When Tuist is executed, it traverses up the directories to find a TuistConfig.swift file. Defining a configuration manifest is not required but recommended to ensure a consistent behavior across all the projects that are part of the repository.

We recommend creating the TuistConfig.swift in the root directory of the repository. For example, let's say we have the following directory scheme:

/.git
.gitignore
/TuistConfig.swift # Configuration manifest
/Framework/Project.swift
/App/Project.swift

That way, when Tuist runs in any of the subdirectories, it'll use the root configuration.

The structure is similar to the project manifest. We need to create a root variable, config of type TuistConfig:

import ProjectDescription
let config = TuistConfig(
compatibleXcodeVersions: ["10.3"],
generationOptions: [
.xcodeProjectName("SomePrefix-\(.projectName)-SomeSuffix")
]
)

TuistConfig

It allows configuring Tuist and share the configuration across several projects.

Compatible Xcode versions

Set the versions of Xcode that the project is compatible with.

CompatibleXcodeVersionsYes.all
Generation options

Options to configure the generation of Xcode projects

[GenerationOption]Yes[]

Compatible Xcode versions

This object represents the versions of Xcode the project is compatible with. If a developer tries to generate a project and its selected Xcode version is not compatible with the project, Tuist will yield an error:

CaseDescription
.allThe project is compatible with any version of Xcode.
.list([String])The project is compatible with a list of Xcode versions.
ExpressibleByArrayLiteral and ExpressibleByStringLiteral

Note that 'CompatibleXcodeVersions' can also be initialized with a string or array of strings that represent the supported Xcode versions.

GenerationOption

Generation options allow customizing the generation of Xcode projects.

CaseDescription
.xcodeProjectName(TemplateString)Customise the name of the generated .xcodeproj.

TemplateString

Allows a string with interpolated properties to be specified. For example, "Prefix-(.projectname)".

CaseDescription
.projectNameThe name of the current project.