【发布时间】:2014-02-26 11:49:54
【问题描述】:
我在同一台 Mac 上安装了两个不同的 Xcode 版本(Xcode 4 和 Xcode 5)。 Xcode 4 位于 Applications 文件夹中。 因此,每当我从终端构建任何项目时,它自然会使用 Xcode 4 进行编译。有没有办法使用 Xcode 5(在桌面中)从终端构建项目?
【问题讨论】:
标签: xcode
我在同一台 Mac 上安装了两个不同的 Xcode 版本(Xcode 4 和 Xcode 5)。 Xcode 4 位于 Applications 文件夹中。 因此,每当我从终端构建任何项目时,它自然会使用 Xcode 4 进行编译。有没有办法使用 Xcode 5(在桌面中)从终端构建项目?
【问题讨论】:
标签: xcode
我认为命令 xcode-select 正是出于这个原因。
Usage: xcode-select [options]
Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example,
xcodebuild) as well as the BSD development commands (such as cc and make).
Options:
-h, --help print this help message and exit
-p, --print-path print the path of the active developer directory
-s <path>, --switch <path> set the path for the active developer directory
-v, --version print the xcode-select version
-r, --reset reset to the default command line tools path
【讨论】:
我遇到了同样的问题。我已经更改了 Xcode 首选项中的命令行工具选项。在这里你可以选择你想使用的 Xcode 版本。
【讨论】: