Game World!

Join A World Of Gamers

Enter your email address:

Delivered by FeedBurner

Followers

Popular Posts

Wednesday, 30 June 2021

How do I know if Xcode is installed on my Mac?

 

Installing XCode and Enabling Command Line Tools


This page concerns getting XCode on your Mac. In previous releases of the Mac OSX operating system, XCode hasn't always come pre-installed. However, it contains components, like the C++ compiler, that will be essential for our purposes, so we'll need to make sure it's installed on your machine. On your machine, it's possible that:

  • XCode is properly installed but you just don't know it,
  • XCode is downloaded but not yet installed, or
  • XCode is not at all on your machine.

If you have a Mac provide by the 2.680 staff, and have just created your own user account, the most likely scenario is the first one. In any event, we'll soon find out.

Checking if XCode is installed (using the command line)    [top]


This help topic is written for someone who is not yet using the command line (Terminal application) to do most things. But, if you do have a command line handy, you can check to see if XCode is installed by typing the following:

  $ which g++
  /usr/bin/g++

If you get the above reply (not just a blank reply), you're done with this help topic. Otherwise, read on.

Checking if XCode is already installed (using Finder)    [top]


Finder is the Mac application that is running constantly and by default upon login. To switch over to running Finder, just click anywhere in the screen background outside an app. We'll use Finder to find out if XCode is installed.

  • In Finder, select Go To Folder from the Go pull-down menu. (Or just type the Command-Shift-G keyboard shortcut.
  • This should open a new window. Type in /Developer/Applications and hit Go.
  • This should open a new Finder window. Look for the XCode icon in the Applications folder. It is blue and has a little hammer.
  • If you see it, you're done. Otherwise, read on...

Checking if XCode is downloaded but not installed    [top]


If you have a course-provided computer, this is the most likely case. We (try) to download the XCode image from Apple before giving out the computers, but each new user needs to install XCode.

  • Open Finder using one of it's nicer keyboard shortcuts - type Command-Shift-A. This opens a new Finder window right in the /Applications folder.
  • Look for an icon that says Install XCode in the Applications folder. It is blue and has a little hammer.
  • If you see it, double click on it, follow the instructions, and you're done.
  • If you don't see it, read on....

Installing XCode if it is not installed    [top]


XCode is distributed by Apple. It is free but Apple wants you to sign up as a developer to have access to XCode. This can be done anonymously, but you have to do the following steps:

  • Obtain XCode from the App Store. Even though it's free, this is still the way to install it on your computer. To access the App Store, you will need to have a network connection. The icon should look like:

Figure 1.1: The App Store icon.

  • Once you have launched the App Store, search on the term "XCode". You should see something like:

Figure 1.2: The XCode Application.

  • You need to "buy" the XCode App even though it is free, cost of zero dollars. You will be prompted for your Apple ID. You won't be charged.

Install the optional XCode command line tools    [top]


In more recent versions of XCode, an extra step may need to be taken to install the command line tools. Before you start writing and compiling your own code, it's a good idea to launch the XCode App, and opt in for any queries to install additional tools, or command line utilities. Then you can safely quit XCode and with confidence that all the tools you need for developing are installed.

At some point you may want to use a full feature integrated development environment (IDE) like XCode. Another option is Eclipse. In most cases in our lab and in 2.680, we will work simply with a text editor like Emacs or Vim.

Floating Button

Button