Setting up Apple's developer tools
The Xcode integrated development environment (IDE) is Apple's core product for developers. It includes GUI tools for the design, configuration, development, and testing of apps. As an add-on, the Xcode Command Line Tools enable full control of Xcode projects from the command prompt in Terminal. For iOS developers, the iOS SDK is also essential. It includes all the standard iOS libraries as well as tools for simulation and deployment.
Xcode is available for free from the Mac App Store and comes with the current version of the iOS SDK. Go to https://itunes.apple.com/us/app/xcode/id497799835, open Xcode's App Store link, and start the installer. The installer may run for an hour or longer, including the time to download Xcode and the iOS SDK. Give your agreement to any prompts, including the prompt to reboot.
Once Xcode is installed, open Terminal and run the following command to install the Xcode Command Line Tools:
$ xcode-select install
Again, give your agreement to any prompts. Once the Xcode Command Line Tools are installed, run the following command to ensure that you have reviewed and accepted the required license agreements:
$ sudo xcodebuild -license
The text of the agreements will appear in Terminal. Press spacebar repeatedly until you reach the end of the text, then type agree
, and press Enter. Now, we have the basic tools to develop iOS projects in Xcode and Terminal.