Reputation: 588
I have two different Xcode version installed on the same mac (Xcode 4 and Xcode 5). Xcode 4 is in the Applications folder. So whenever I build any projects from the terminal, naturally it compiles by using Xcode 4. Is there any way to use Xcode 5 (which is in desktop) to build a project from the terminal?
Upvotes: 2
Views: 880
Reputation: 177
I had the same problem. I had changed the command-line tools option in Xcode's preferences. Here you can choose which version of Xcode, you wanted to use.
Upvotes: -1
Reputation: 25144
I think the command xcode-select
is here for this precise reason.
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
Upvotes: 2