Installing Xcode

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

Each Friday, my weblog entry will be something from what I’ll call “the geeky side” of OS X. That doesn’t, however, mean it’s necessarily going to be a Unix tip. Instead, the Friday blog will focus on those things that fall outside the realm of the somewhat stereotypical “check in e-mail, browse the web, write documents, create spreadsheets, design presentations, create graphics, etc.” uses of OS X. For instance, we may talk about modifying a Dashboard widget to suit your needs. Or tweaking the appearance of an application to look more pleasing to your eyes. Or downloading and installing some open-source program that does something potentially cool and/or useful. So although the hints here may often involve the Unix side of OS X, that’s not necessarily all you’ll see here each week.

If you’d like to try some of the Friday hints (and I promise that none of them will be destructive in nature, even if you do something wrong!), there are some prerequisites. Note that all of the following may not be required for any given hint, but they will probably all prove useful at one time or another:

  • You should be at least familiar with the basics of the Terminal application (in /Applications/Utilities). This includes launching the application, having a decent understanding of some simple Unix commands like cd, ls, cp, and mv. You should feel comfortable typing in other commands, even if you don’t necessarily understand what every word of the command does (I’ll do my best to explain everything if it’s a complex command, however). Friday’s hints will not be a good place to learn the basics of Unix, mainly because I’d be a horrendously bad teacher for such a subject! However, none of these Friday hints will require much in-depth Unix knowledge (again, because that’d make me the wrong person to be talking about it!).
  • You should be comfortable editing pure text files, either in one of the bundled Unix editors like vi, emacs, or pico, or using something like BBEdit, TextWrangler, Smultron, TextEdit, or any of the numerous other text editors available. By editing, I mean adding, deleting, and changing lines of text, as well as possibly creating a new file from scratch and then copying and pasting some code prior to saving the file.
  • Some of the hints may involve AppleScript, so you should have at least some familiarity with Script Editor, in /Applications: AppleScript. Again, the needs here won’t be too advanced, just some basic entering and saving of a script.
  • You should have access to a graphics application, such as Photoshop or Photoshop Elements, as some hints may involve editing some graphics.
  • Finally, the biggest requirement, and the one that’s the focus of this week’s first hint: you must have the Xcode Developer Tools installed. I’ll walk you through that process next, covering everything from download through installation. Note that there are two versions of Xcode. Version 1.5 runs on Panther, and version 2.1 (and newer) requires Tiger. There’s actually a third version—Xcode 2.0 shipped on the original Tiger installation DVDs back in April. Most of the hints I’ll publish that relate to compiling Unix software for OS X should work just fine with whatever version of the tools you have installed. Some, however, especially those that focus on the programs included with the tools, will require Xcode 2.1, so that’s what today’s hint explains how to install.

If you’ve got some time and an interest in looking “behind the scenes” of your OS X machine, I think you’ll find the Friday blog entries potentially useful and hopefully always educational! And now, on with the installation of Xcode.

The following is a very thorough set of instructions, so the process may appear more complex than it really is. The executive summary version is as follows:

  1. Download Xcode 2.1 (10.4 required) from Apple’s site.
  2. Run the installer and install everything other than the documentation.
  3. There is no step three.

The full version is, obviously, quite a bit longer…

Xcode is, in Apple’s own words:

… Apple’s tool suite and integrated development environment (IDE) for creating Mac OS X Universal Binaries that run natively on PowerPC and Intel-based Macintosh computers.

But relax, we’re not actually going to be using it to write any code of our own. (That’s clearly an area where I am most definitely the wrong guy to be doing the talking!) Instead, we’ll be using Xcode to help us make certain Unix programs run on our Macs, as well as playing with some of the tools that even non-techies may find of interest.

Before you can use Xcode, of course, you need to install it. Version 2.1 is current as of today, Tiger shipped with Xcode version 2.0 on the installation DVD, and OS X 10.3 uses Xcode 1.5. Any version should work fine for most the hints I’ll be running, but those that focus on programs within the Xcode package will usually be based on version 2.1. When it matters, I’ll do my best to remember to state the Xcode version requirements for a given hint.

Xcode is available for free from Apple’s Developer Site, but you’ll have to do just a bit of work to get it.

Before proceeding, be aware that Xcode is a large download—nearly 752MB, to be exact. If you don’t have a fast broadband connection, you may want to find someone who does and have them do the downloading for you.

First, you’ll need a free ‘online only’ Apple Developer Connection (ADC) account. Luckily, if you already have an existing Apple account (.Mac, Apple Store, iTunes Music Store, or AppleCare), you already have one! Just use that username and password to login on the ADC Member Site, check the box agreeing to the terms, and reply to the confirmation e-mail you’ll receive. You’ll probably be asked a couple of questions about your job and what you develop for; answer what best matches your interests. If you don’t have an Apple ID of any sort, you’ll have to use the Join Now link on the ADC Member Site to request a new free account. The process isn’t much harder; you’ll just have to fill in more form fields before getting your account. After you have your account, return to the site and login.

Once you’re logged in, you should see the main ADC page:

Apple Developer Connection main page

Click on Downloads, then click on Developer Tools in the right-hand Downloads block. Scan the list of files that appears, and download the Xcode Tools 2.1 disk image—it’s a whopping 751.8MB in size. Go have some coffee. A lot of coffee. If you’re using dial-up, go read War and Peace . Twice. In its native Russian. With one eye closed.

When you’re done, you should have the Xcode disk image in your downloads folder. Double-click the image to mount it, and then double-click on the Xcode Tools.mpkg icon in the window that opens. This will launch the package installer for Xcode.

Follow the usual Apple installer routine (note that Xcode must be installed on your boot disk) until you get to the Easy Install screen. Here, unless you have gobs of hard drive space and don’t mind wasting nearly a gigabyte of it, click the Customize button. Uncheck the Developer Documentation option, which you won’t need unless you’re a full-blown developer, in which case, you’ve probably already got these tools installed. This simple step will save you over 800MB of drive space! The installer customization screen should look like this just before you install:

Developer Tools Installer customization screen

Once you’ve got insured that all the proper packages marked, click the Install button, then sit back and wait again—now would be a good time to finish War and Peace if you didn’t quite get through it the second time earlier. Actually, this step will go quickly, especially without the documentation. When the process is done, you’ll have a brand-new set of Developer Tools, installed and ready for your use. You’ll find the visible portion of Xcode in your boot disk’s new Developer folder (at the same level as Applications, Users, etc.). Xcode installs other bits of stuff in many spots on your drive, but the Developer folder holds all of its GUI tools.

If you want to try out some of the Xcode programs, look in /Developer/Applications. Most of what you’ll see there will only be of use to serious developers, but there are some hidden gems—for example, if your machine supports Core Image, try running Core Image Fun House (in the Graphics Tools folder) for some fun with images. See you next Friday for more from behind the scenes of OS X.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
Shop Tech Products at Amazon