Skip to main content

Settings

A group of build settings configuration for projects and targets.

Overview

The Settings type allows you to define build settings, configurations, and xcconfig files for both projects and targets. Settings can be defined at different levels and are merged according to Xcode’s build setting resolution rules.

Basic Usage

Custom Configurations

With XCConfig Files

Simple Settings (Default Configurations)

.settings() Method

Creates settings with default Debug and Release configurations.
SettingsDictionary
default:"[:]"
A dictionary with build settings inherited by all configurations.
SettingsDictionary
default:"[:]"
Build settings specific to the Debug configuration.
SettingsDictionary
default:"[:]"
Build settings specific to the Release configuration.
DefaultSettings
default:".recommended"
An enum specifying the set of default settings. See DefaultSettings section below.
String?
default:"nil"
The default configuration to be used when building from the command line.

Custom Configurations Settings

.settings(configurations:) Method

Creates settings with custom configurations.
SettingsDictionary
default:"[:]"
A dictionary with build settings inherited by all configurations.
[Configuration]
required
A list of custom configurations. Should not be empty - use the simpler method for default Debug/Release configurations.
DefaultSettings
default:".recommended"
An enum specifying the set of default settings.
String?
default:"nil"
The default configuration to be used when building from the command line.

Configuration

Represents a build configuration (Debug or Release variant).

Debug Configuration

ConfigurationName
required
The name of the configuration to use.
SettingsDictionary
default:"[:]"
The build settings to apply for this configuration.
Path?
default:"nil"
The xcconfig file to associate with this configuration.

Release Configuration

Parameters are the same as debug configuration.

SettingValue

Represents a build setting value, which can be a string, array of strings, or boolean.

String Value

Array Value

Boolean Value

From RawRepresentable

DefaultSettings

Specifies the default set of settings applied to projects and targets.
Recommended settings including warning flags to help catch bugs early. This is the default.
Recommended settings with specific keys excluded, allowing you to override them in custom configurations.

.essential

A minimal set of settings to make the project compile (e.g., PRODUCT_NAME, TARGETED_DEVICE_FAMILY).

.essential(excluding:)

Essential settings with specific keys excluded.

.none

Tuist won’t generate any default build settings. You must provide all necessary settings manually.

Examples

Project-Level Settings

Target-Level Settings

Multiple Environments

Setting Resolution Order

Build settings are resolved in this order (later overrides earlier):
  1. Tuist’s default settings (if .recommended or .essential)
  2. Project base settings
  3. Project configuration settings
  4. Project xcconfig file
  5. Target base settings
  6. Target configuration settings
  7. Target xcconfig file
  • Project - Can have project-level settings
  • Target - Can have target-level settings
  • Scheme - References configurations in actions