TeamCity On-Premises 2024.12 Help

Xcode Project

The Xcode Project build runner supports Xcode 3 (target-based build), Xcode 4 (scheme-based build), Xcode 5-13.

The runner provides structured build log based on Xcode build stages, detects compilation errors, reports tests from the xcodebuild utility, adds automatic agent requirements for the appropriate version of tools installed (Xcode, SDKs, and so on) and reporting tools via agent properties.

Working with different Xcode setups

  • If only one Xcode version is installed on the agent machine, it will be used by default. The agent restart is required if Xcode was installed/updated.

  • If several Xcode versions are installed, perform one of the following:

    • specify the path to the required version in the "Path to Xcode" setting (see below) of the Xcode Project build step settings

    • select the default XCode distribution using the xcode-select tool.


      Path to Xcode: /Applications/Xcode.app/Contents/Developer.


      Command to switch: sudo xcode-select -s path_to_xcode_distribution.

Xcode Project Runner Settings

Setting

Build

Description

Path to the project or workspace

The path to a (.xcodeproj) project file or a (.xcworkspace) workspace file, should be relative to the checkout directory. For Xcode 3 build, only the path to the project file is supported.

Working directory

Specify the build working directory.

Path to Xcode

Specify the path to Xcode on the agent. The build will be run using this Xcode.

Build

Select either a target-based (for project) or scheme-based (for project and workspace) build. Depending on the selection, the settings displayed will vary.

Scheme

Scheme-based

Xcode scheme to build. The list of available schemes is formed by parsing your project/workspace files in the VCS. Make sure your Path to the project or workspace is set correctly and click the Check/Reparse Project button to show/refresh the schemes list. Note that a scheme must be shared to be shown in the list (to check if your scheme is shared, verify that it is located under the xcshareddata directory and not under the xcuserdata one, and that the xcshareddata folder is committed to your VCS. To check the latter, use the VCS tree popup next to the Path to the project or workspace field). More information on managing Xcode schemes is available in the Apple documentation.

Build output directory

Scheme-based

Check the Use custom box to override the default path for the files produced by your build. Specify the custom path relative to the checkout directory.

Target

Target-based

Xcode target to execute. The list of available targets is formed by parsing your project files in the VCS. Make sure your Path to the project is set correctly and click the Check/Reparse Project button to show/refresh the targets list.

Configuration

Target-based

Xcode configuration. The list of available configurations is formed by parsing your project files in the VCS. Since the configuration depends on the target, you must choose the target first. Make sure your Path to the project is set correctly and click the Check/Reparse Project button to show/refresh the configurations list.

Platform

Target-based

Select from the default, iOS, macOS or Simulator - iOS or any other platform (if it is provided by the agent) to build your project on.

SDK

Target-based

You can choose an SDK to build your project with (the list of available SDKs is formed according to the SDKs available on your agents for the platform selected).

Architecture

Target-based

You can choose an architecture to build your project with (the list of available architectures is formed according to the architectures available on your agents for the platform selected).

Build action(s)

Xcode build action(s). The default actions are clean and build. A space-separated list of the following actions is supported: clean, build, test, archive, installsrc, install; the order of actions will be preserved during execution.

It is not recommended changing this field unless you are sure you want to change the number or order of actions.

Run tests

Select this option if want to run tests after your project is built.

Additional command line parameters

Other command line parameters to be passed to the xcodebuild utility.

Last modified: 07 September 2023