What is a build setting?

A build setting provides information necessary for building the product of a target. For each task performed during the build process—such as compiling Swift code—build settings control how that task is performed.

You configure build settings in the Build Settings pane of the project editor.

Build setting attributes

Each build setting has the following attributes:

Attribute

Description

Example

Title

A human-readable name for the build setting that appears in the Build Setting pane.

Build Active Architecture Only

Name

The name for the build setting that appears in the Quick Help inspector, appears in build configuration (xcconfig) files, and used by the xcodebuild command-line tool.

ONLY_ACTIVE_ARCH

Value type

Each build setting requires a specific type of value. There are numerous value types, but the following are the most common:

  • Boolean: A value of YES or NO.

  • string: A specified text value.

  • enumeration (string): A predefined text value.

  • string list: A space-separated list of string values. If a string within a string list contains spaces, then the string must be surrounded by quotes.

  • path: A file or directory path, in POSIX form.

  • path list: A space-separated list of path values. If a path within a path list contains spaces, then the path must be surrounded by quotes.

Value types are displayed in the Quick Help inspector when a build setting is selected in the project editor.

Boolean

Value

A value of the specified type.

YES

See alsoConfigure build settingsLearn about a build settingBuild settings referenceConfigure schemesWhat is the build system?