How To Install Xcode & Start Your First Project

You must have access to an Apple ID account. Xcode and Xcode Command Line Tools are only accessible through this method via Mac and other iOS Devices.

NOTE: You must have access to an Apple ID account: to register, click here. For this method, Xcode and Command Line Tools are only accessible via Mac and other iOS Devices.

00000000000000000000000000000000000000000000

Apple provides Mac devs with both Xcode and Command Line Unix Tools, but you’ll need to access Apple’s servers first in order to reach them:

00000000000000000000000000000000000000000000

Installing Xcode…

00000000000000000000000000000000000000000000

Access your Mac’s Terminal Application or what’s otherwise referred to as the Console; anything typed into this terminal is sent straight to your device’s Operating System:

00000000000000000000000000000000000000000000

  • Press “Command + Spacebar” to access Spotlight Search

 

  • Type in the word “Terminal” into the Spotlight search field and hit Enter; this should execute your Mac’s Terminal app

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

Type “gcc” into the terminal and hitEnter (gcc is a compiler that turns source code into executable applications). Alternatively, typing “xcode-select –install” into the terminal works just as well.

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

Before installing Xcode Command Line Tools, click Get Xcode

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

In order to install Xcode from the App Store, you’ll need to first log-in through your Apple Id. If you haven’t already created one, you can do so by clicking here.

00000000000000000000000000000000000000000000

 

00000000000000000000000000000000000000000000

NOTE: the installation may not initiate until you’ve completed particular software updates. To check, click the Updates tab and select Update All

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

 

To monitor the installation’s progress, open Spotlight Search by pressing Command + Spacebar and type in/open up Launchpad

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000


00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

Creating your first project…

00000000000000000000000000000000000000000000

Upon opening Xcode, you’ll see this screen. Click on “Create a new Xcode Project

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

 

On the right hand side, you’ll notice a selection of different app templates. Select “Single-View Application” and click Next

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

Product Name: This is the name that will appear for users in the store and should be similar to the app name you’d later enter into iTunes. Let’s name this “MyFirstProject.”

00000000000000000000000000000000000000000000

Organization Name: Affects not only the Bundle Identifier, but the Bundle Identifier of every other application. Leave it as it is for now. The top of all your files will likely say your name, but we can edit that out later if need be.

00000000000000000000000000000000000000000000

Organization Identifier: Set this to “com.example.[Your Name]” where – like in the picture above – [Your Name] represents your Organization Name after being shortened down: the Organization name David Murphy is changed to dmurphy.

00000000000000000000000000000000000000000000

The Devices tab lists the different devices that you’d like your app to run off of. For now, leave Universal as the selected option and click Next. On the next window hit Create after choosing your desired location – Desktop is assigned as default.

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

Congratulations! You’ve created your first Xcode Project!

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

Installing Xcode Command Line Tools…

00000000000000000000000000000000000000000000

Xcode has almost everything you’ll need to program apps in a tightly packed 3.8 GB download; however, most developers will be coding more than just iOS applications, and most Macs come unequipped with the Unix tools that would otherwise let developers branch off into other territories of programming. The decision to exclude them was made to conserve space and avoid unnecessary storage usage, as Unix Tools were deemed necessary for iOS app developers.

00000000000000000000000000000000000000000000

To install Xcode Command Line Tools, navigate to your device’s Terminal app again through Spotlight Search. Then, type “xcode-select –install” into your terminal and hit Enter

00000000000000000000000000000000000000000000

 

Instead of clicking “Get Xcode” like before, find and click Install at the bottom-right-hand corner of the new window

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

NOTE If Xcode Command Line Tools was previously downloaded onto your device, you’ll likely get an error that resembles the one I received on my screen below:

 

00000000000000000000000000000000000000000000

Terms and Agreement screen will: Read it (or don’t); if you accept Apple’s Terms, then hit Agree to proceed with the installation

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

 

Once the installation is complete, click Done

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

 

Just to verify that you’ve downloaded the correct version, type “gcc –version” and the terminal will spit back the version that’s currently installed. Your version should either match or be more updated than the one highlighted below.

00000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000

 

The entire command line toolkit package is located by default at/Library/Developer/CommandLineTools/.

00000000000000000000000000000000000000000000

Congratulations! You’ve successfully downloaded Xcode Command Line Tools!