2.2.2. Xcode

Xcode is an IDE for OSX/iOS development (Wikipedia).

2.2.2.1. Default install with App Store

Go to App Store:

../../_images/01-go-to-app-store.png

Search for Xcode application:

../../_images/02-search-for-xcode.png

Run install:

../../_images/03-run-install.png

After successful installation run Launchpad:

../../_images/04-launchpad.png

Search for Xcode and launch it:

../../_images/05-launchpad-xcode.png

Success!

../../_images/06-xcode-launched.png

Note

Other developer tools are installed now too.

2.2.2.2. Several/custom Xcode versions

If you want to have several Xcode versions simultaneously for testing purposes or you want a specific version of Xcode you can download/install it manually from Apple Developers site.

For example:

> ls /Applications/develop/ide/xcode
4.6.3/
5.0.2/
6.1/
6.4/
7.2/
7.2.1/
7.3.1/

The default directory and version can be checked with xcode-select/xcodebuild tools:

> xcode-select --print-path
/Applications/develop/ide/xcode/7.3.1/Xcode.app/Contents/Developer

> xcodebuild -version
Xcode 7.3.1
Build version 7D1014

The default version can be changed with xcode-select -switch:

> sudo xcode-select -switch /Applications/develop/ide/xcode/7.2/Xcode.app/Contents/Developer

> xcodebuild -version
Xcode 7.2
Build version 7C68

Or by using the environment variable DEVELOPER_DIR:

> export DEVELOPER_DIR=/Applications/develop/ide/xcode/7.3.1/Xcode.app/Contents/Developer
> xcodebuild -version
Xcode 7.3.1
Build version 7D1014

> export DEVELOPER_DIR=/Applications/develop/ide/xcode/7.2/Xcode.app/Contents/Developer
> xcodebuild -version
Xcode 7.2
Build version 7C68