Configuration

Tuist can be configured through a Config.swift manifest. When Tuist is executed, it traverses up the directories to find a Tuist directory that contains a Config.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.

The example below shows a project that has a global Config.swift file that will be used when Tuist is run from any of the subdirectories:

/.git
.gitignore
/Tuist/Config.swift # Configuration manifest
/Framework/Project.swift
/App/Project.swift
Copy the content

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 Config:

import ProjectDescription
let config = Config(
compatibleXcodeVersions: ["10.3"],
generationOptions: [
.xcodeProjectName("SomePrefix-\(.projectName)-SomeSuffix"),
.organizationName("Tuist")
]
)
Copy the content

Config

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

PropertyDescriptionTypeOptionalDefault
Compatible Xcode versions

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

Type: CompatibleXcodeVersions
Optional: Yes
Default value: .all

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

CompatibleXcodeVersionsYes.all
Generation options

Options to configure the generation of Xcode projects

Optional: Yes
Default value: []

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
.all

The project is compatible with any version of Xcode.

The project is compatible with any version of Xcode.

.list([String])

The project is compatible with a list of Xcode versions.

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.

Customise the name of the generated .xcodeproj.

.organizationName(String)

Customise the organization name of the generated .xcodeproj.

Customise the organization name of the generated .xcodeproj.

.disableAutogeneratedSchemes

Generate only custom defined schemes, skip default auto generated schemes

Generate only custom defined schemes, skip default auto generated schemes

TemplateString

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

CaseDescription
.projectName

The name of the current project.

The name of the current project.

Tuist's logotype

Tuist

Documentation

Getting startedManifest specificationDependenciesContributors
Tuist © Copyright 2019. All rights reserved. Crafted with ♥ by Pedro Piñera & the contributors.

Other

GitHubSlackBlogReleases
Tuist © Copyright 2019. All rights reserved. Crafted with ♥ by Pedro Piñera & the contributors.