COPYRIGHTED MATERIAL. Installing Xcode. The Xcode Installer

Similar documents
About Xcode and iphone SDK

Mac OS X 10.6 Snow Leopard Installation and Setup Guide

Running Java Programs

iphone Development Setup Instructions Nikhil Yadav Pervasive Health Fall 2011

Detailed Installation Guide. Version 1.0

Kurzweil 3000 for Macintosh Standalone Installation and Administration Guide. Version 3

XP: Backup Your Important Files for Safety

These are exciting times for Macintosh users. When Apple unleashed Mac

Mehran Sahami Handout #5 CS 106A September 26, 2018 Downloading Eclipse

2. install windows vista

Building a 64-bit CentOS 7 Workstation using Oracle Virtual Box

Intel Integrated Native Developer Experience 2015 Build Edition for OS X* Installation Guide and Release Notes

Ensuring your computer has Java

Using Eclipse for C Programming

Installing Your Software Important:

Online Backup Client User Manual

Add and initialize storage using Disk Utility. Verify your Mac s RAM and upgrade options.

COP 3014: Spring 2018 A Guide to Using CLion

Version June 2016

Getting Started Guide. Installation and Setup Instructions. For version Copyright 2009 Code 42 Software, Inc. All rights reserved

Learn Linux in a Month of Lunches by Steven Ovadia


The following information is intended to get you up and running as quickly as possible and covers the following: m contents of the box m about online

Clean & Speed Up Windows with AWO

Abstract. This is the MySQL OS X extract from the MySQL 5.6 Reference Manual. For legal information, see the Legal Notices.

Panda Antivirus Server for Mac User Manual

Network Management Utility

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup

Open Transport User s Guide

The build2 Toolchain Installation and Upgrade

Boot Camp Installation & Setup Guide

Kurzweil 3000 for Macintosh Standalone Installation and Administration Guide. Version 4.6

Boot Camp Installation & Setup Guide

SIS offline. Getting Started

menu of icons which you can select which item you want to use to startup the computer.

Mac OS 8 Installation Instructions for Sonnet Presto and Presto Plus Processor Upgrade Cards

Setting up Python 3.5, numpy, and matplotlib on your Macintosh or Linux computer

CIS 231 Windows 10 Install Lab # 3

Abstract. This is the MySQL OS X extract from the MySQL 5.5 Reference Manual. For legal information, see the Legal Notices.

EDGE, MICROSOFT S BROWSER

Parallels Virtuozzo Containers 4.6 for Windows

DOWNLOAD PDF CREATOR FOR WINDOWS 8 64 BIT

POOSL IDE Installation Manual

ADOBE DRIVE 4.2 USER GUIDE

Online Backup Client User Manual

Operator s Manual. For FreshStart Service Providers by CyberSpa LLC. All rights reserved.

Read Naturally SE Update Windows Network Installation Instructions

Installing Komplete 5 with Direct Install

The Reading Inventory Installation Guide

Installing CEA on an Intel Mac

Regardless of the size and complexity of the computer and the operating system, all operating systems perform the same four basic functions:

READ 180 Next Generation Installation Guide

If a communications application cannot recognize your PowerPort modem, then follow the troubleshooting steps below.

m At Ease 3.0 or later (earlier versions of At Ease are not supported)

POLKADOTS SOFTWARE Installing PrePage-it Client 5.1. PrePage-it Client Installation Guide

Appendix B. Install Microsoft Personal Web Server

ENCM 339 Fall 2017: Editing and Running Programs in the Lab

MicroPress 8. MicroPress 8 Installation Guide

Over the next several hundred pages, you can find out about the applications

If you ve never used Quicken, begin here. This chapter tells you how to

BETA This caution icon indicates important information.

Silk Performance Manager Installation and Setup Help

1. Turn on your laptop. The power button/key is in the topright corner of your keyboard.

Upgrading to Parallels Virtuozzo Containers 4.0 for Windows. Contents. About This Document

Scholastic Reading Inventory Installation Guide

Boot Camp Installation & Setup Guide

This video is part of the Microsoft Virtual Academy.

CABC Installation Guide Maximizer CRM 11 Entrepreneur Edition

1 Build Your First App. The way to get started is to quit talking and begin doing. Walt Disney

Table of Contents. ShredIt X Read Me.

Coeus Installation and Troubleshooting

How To Uninstall Programs On Mac Os X Snow Leopard Without Disc

_APP A_541_10/31/06. Appendix A. Backing Up Your Project Files

ENCM 339 Fall 2017: Cygwin Setup Help

Setting Up Your ios Development Environment. For Mac OS X (Mountain Lion) v1.0. By GoNorthWest. 5 February 2013

QuickStart Guide for Managing Computers. Version 9.73

Mehran Sahami Handout #5 CS 106A September 27, 2017 Downloading Eclipse

READ 180 Next Generation Installation Guide

FASTT Math Installation Guide

COMMON WINDOWS 10 QUESTIONS & ANSWERS

Background. $VENDOR wasn t sure either, but they were pretty sure it wasn t their code.

Registering for the Apple Developer Program

Abstract. This is the MySQL OS X extract from the MySQL 5.7 Reference Manual. For legal information, see the Legal Notices.

Moving from FrameMaker to Blaze: Best Practices

Getting Started with Visual Basic 2005 Express Edition

IMPORTANT Transferring Information from an Earlier Model Newton Personal Digital Assistant (PDA)

Setting up Eclipse (Windows), or GCC (Mac) Setting up Atmel Studio (Windows & Mac)

Xcode. Chapter 1. Creating a Project

1 Installation (briefly)

Manually Kill Process Mac Os X Terminal Running

Distributed Rendering Setup Guide

Getting Started with QuarkXPress 2015

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

System 44 Installation Guide

Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T

FileWave 10 Webinar Q&A

Intel Integrated Native Developer Experience 2015 Build Edition for OS X* Installation Guide and Release Notes

MFP MAINTENANCE & INSTALLATION Document Number: Effective Date: 04/30/06 v5 Page: 1 of OBJECTIVE 2.0 SCOPE 3.0 MAINTENANCE PROCEDURE

Department of Computer Science. Software Usage Guide. CSC132 Programming Principles 2. By Andreas Grondoudis

Operator s Manual. FreshStart Automated Drive Replacement Tool by CyberSpa LLC. All rights reserved.

Transcription:

1 Installing Xcode Xcode is part of the Xcode Developer Tools suite developed and distributed by Apple Computer. If you haven t installed it already, read this chapter to find out how to do so. If the tools are already installed, you can skip to the next chapter. If you ve already installed Xcode, be aware that the default installation choices do not include all Xcode components. Features described in some chapters may require you to reinstall the omitted packages before you can use them. Return to this chapter to reinstall, upgrade, or remove the Xcode Developer Tools in your system. The Xcode Development Tools encompass a huge amount of material: dozen of applications, scores of utilities, hundreds of sample projects, and tens of thousands of pages of documentations. Despite its scope, the developer tools team at Apple has made it remarkably easy to install this wealth of tools in only a few minutes. The Xcode Installer To install the Xcode Developer Tools, you must be running Mac OS X and have access to an Xcode Developer Tools installer. At the time this book was published, the current version of Xcode was 2.2, which requires that you be running Mac OS X 10.4 or later. This entire book was written with, and assumes you are using, Xcode version 2.2. COPYRIGHTED MATERIAL The Xcode Developer Tools installer is included on every Mac OS X 10.4 installation and upgrade DVD. So if you have a Mac OS X 10.4 installer DVD, you should already have a copy of Xcode. However, the copy of Xcode on the original release of OS X 10.4 is Xcode version 2.1. Although you can successfully use this book with Xcode 2.1, there are numerous small differences between 2.1 and 2.2. Download and install Xcode 2.2 if you can. You can download a disk image of the latest Xcode Developer Tools from the Apple Developers Connection at http://developer.apple.com/. Anyone with an ADC account can download the latest development tools, software development kits, and example code directly from Apple.

Chapter 1 Online ADC accounts are free and require only that you create an ADC account and agree to the nondisclosure agreement that covers all Apple development technologies. Student, Select, and Premier accounts can be purchased and include many additional benefits. One of these is the monthly ADC mailing, which ships current copies of the tools and reference material to you on CD or DVD. Other perks include discounts on hardware used for development and direct access to Apple engineers for technical questions. If you are serious about developing software for Mac OS X, you should invest in a Student or Select membership. Running the Installer Open the Xcode Tools folder found on the Mac OS X install DVD, shown on the left in Figure 1-1 or open the Xcode Developer Tools disk image, shown on the right in Figure 1-1 whichever you are using. To begin the installation process, open the Xcode Tools.mpkg package. This launches the installer utility. Figure 1-1 The installer presents a simple greeting screen. Click the Continue button. It next presents the software licensing agreement that accompanies the use of all of the developer tools provided by Apple Computer. The pop-up menu at the top of the window allows you to read the licensing agreement in English or Japanese. Review the document using the scroll bar. If you like, you can save it as a PDF file for review or for your records by clicking the Save button. The Print button prints the licensing agreement on any available printer. After you click the Continue button, a dialog box asks you to confirm that you agree to the terms of the license. Click the Agree button. Use the next screen, shown in Figure 1-2, to select the volume where the Xcode tools will be installed. The Xcode Development Tools can only be installed on the volume your operating system is currently booted from. In addition, the operating system you are running must meet the minimum requirements of the version of Xcode you are trying to install. If these conditions are not met, the volume has a red alert badge. Select the volume to find out why the tools can t be installed there. 2

Installing Xcode Figure 1-2 After selecting your boot volume, click the Continue button again. In the next screen, the installer offers to perform a basic installation or upgrade of the Xcode tools. This is suitable for most beginning developers. Remember that you can always run the installer again to install additional packages in the future. If you want to expand or contract the set of software tools that get installed, click the Customize button. The pane changes to a list of packages, as shown in Figure 1-3. Figure 1-3 Each package is listed, along with an action and the estimated amount of disk space that package will consume on the volume. Select a package in the list for a brief description of what the package contains. 3

Chapter 1 The following table explains the contents and usefulness of the various Xcode Developer Tools packages. Package Developer Tools Software gcc 4.0 gcc 3.3 Software Development Kits Java Developer Tools Developer Documentation Description This package contains the core set of development tools, including the Xcode IDE. You must install this package if you plan on working with Xcode. The latest version of the gcc compiler. By default, all new projects will use gcc 4.0. You should install this package. The previous version of the gcc compiler. Install this package if you need to compile programs that were written for gcc 3.3 and don t want to compile cleanly with gcc 4.0 for whatever reason. I recommend installing this package if you plan to build any pre-existing software, be that Xcode projects or open source. This is a group of packages that contains the headers, libraries, and development tools needed to develop applications using these technologies. To write any kind of Macintosh software, you must install the Mac OS X SDK. To write any kind of command-line tool or to use any of the standard C libraries, you will need the BSD SDK. If you have no plans to write an X11 application or FireWire driver, you can save some disk space by omitting the more obscure packages. If you have any doubts, install them all. You could waste a lot of time trying to figure out why you can t use a particular set of APIs only to remember later that you didn t install the necessary SDK. This group of packages includes the basic Java developer tools and documentation. Even if you don t plan to write Java applications, install the tools package anyway. They actually take up very little space most of the Java tools are part of the Java framework that s included in the OS and it s just easier to install them now than wonder why things don t work later. The documentation, on the other hand, is a different matter. If you plan to write Java code, install the reference documentation. The size shown for the documentation is not accurate. The size listed is for the compressed archive of documentation that will be expanded when installed. On my system, the Java documentation occupies about 135MB of disk space. This is the ADC Reference library. It contains an invaluable collection of core developer documentation, API documentation, articles, and technical nodes. You should definitely install this package. 4

Installing Xcode Package WebObjects Cross Development Automator Shell Scripts and Actions CHUD Tools Description WebObjects is a group of WebObjects-related development packages. This book doesn t cover WebObjects development. If you have a WebObjects license and are planning to write WO applications, then you will need to install these packages. Otherwise, skip them. Cross-development is a means of writing a Mac OS X application that runs on earlier versions of the operating system. These packages include a complete set of SDKs from earlier versions of the OS. This allows you to compile and link your applications using these older SDKs, just as if you were developing your project on an older version of the OS and Xcode. By default, Xcode installs the 10.3.9 and 10.4.x SDKs. If you plan to write applications that will run on Mac OS X 10.2, install the 10.2.8 SDK package as well. This is a set of Automator actions that let you build projects, check them in and out of source control, and prepare finished applications for installation. Install this package if you plan to use Automator in your development workflow. This package contains an advanced set of performance analysis and debugging tools, including the amazing Shark application that is used extensively in Chapter 16. The CHUD tools are often updated independently of Xcode and have their own installer. If you plan to use these tools, check the ADC web site for a more recent version. If you decide against selecting a custom set of packages, you can return again to the default installation choices by clicking the Easy Install button. After you choose what you want to install, click the Install button to start the installation process, shown in Figure 1-4. You will have to supply the account name and password of an administrator when asked. The installer takes longer than what you would infer from observing the progress bar in the installer window. Most of the documentation gets unpacked from compressed archives. This occurs at the end of the normal installation process, so be patient. The installer may say that it has less than a minute remaining for ten or more minutes. Do not panic and force the installer to quit! You ll end up with a royal mess and have to start all over again. The bulk of the installation occurs in the /Developer folder that is created at the root level of your boot volume, shown in Figure 1-5. Here you will find all of the Xcode applications, command-line tools, example code, and documentation. Do not attempt to move or rename this folder. The installer places support files in the system-wide /Library/Application Support/Apple/Developer Tools folder. It installs some special development frameworks, resources, and a few patches into the /System folder. Finally, it installs several UNIX man pages and a handful of tools into the /usr and /bin folders. 5

Chapter 1 Figure 1-4 Figure 1-5 After the installer is finished, check out the About Xcode Tools.pdf document for an overview of the Xcode Developers Tool package and for any late-breaking news, additions, or corrections. The installer does not require you to restart your system afterwards. You can now skip to Chapter 2. 6

Upgrading Xcode Installing Xcode If you already have an older version of Xcode installed, you ll find some subtle differences when you run the installer again. The installer automatically detects the version of any package that you have previously installed. A basic installation upgrades any packages that need to be upgraded. The custom package selection, shown in Figure 1-6, displays which packages can be upgraded, installed, or skipped. An upgrade indicates that the installer has a newer version of the package to install. The size indicates the estimated amount of additional disk space required to upgrade the package. Skipped packages will not be upgraded or installed. If a package is disabled, Xcode has determined that the existing package does not need to be, or cannot be, upgraded. This is typically because you already have the most current, or a later, version of this software installed. The Xcode installer will never downgrade a package by attempting to install an older version over a newer one. Figure 1-6 After you selected the packages you want upgraded, click the Upgrade button. The installer runs much as it does when installing for the first time. Typically you won t have any problems using your upgraded tools as soon as the installer is finished. However, if you immediately start using some of the performance analysis tools or attempt distributed builds, you may run into problems. These facilities use daemons and system frameworks that may need to be reloaded. Restart your system after upgrading your Xcode tools. 7

Chapter 1 Removing and Reinstalling Xcode The Xcode Development Tools includes the means of completely eradiating itself the entire suite of tools, support files, libraries, and frameworks from your system. One really good reason to do this is the need to perform a clean installation of the tools. Apple often makes pre-release versions of Xcode available to ADC members. As a general rule, you cannot install a release version over a pre-release version even when that release version is newer. You may also have some need to downgrade your installation, something the regular installation process won t allow. To remove your installation of Xcode, open a Terminal window and enter the following command. sudo perl /Developer/Tools/uninstall-devtools.pl If this file is not present, you can run the script from whatever Xcode Developer Tools install disc or image you have. Mount the disc or image and run the script directly from there. This will be something like the following command but possibly with a different path: sudo perl /Volumes/Xcode\ Tools/Utilities/uninstall-devtools.pl The script must be run from an administrator s account. The sudo command prompts you for the password to that account. The script uses the receipts left by previous installations of Xcode to surgically remove everything that was previously installed. It also takes care of a few special cases, such as removing symbolic links that get created during the post-installation process. After the old copy of the developer tools is removed, you can reinstall whatever version of Xcode you want. The installer treats this as a new installation, installing fresh copies of everything. After you reinstall the tools, you must restart your system. The uninstall-devtools script stops processes like the distributed build daemon, but the installer does not restart them again. Removing system frameworks and then replacing them with altered versions can seriously confuse the operating system. Restarting your computer causes all of these resources to be reloaded, reinitialized, and restarted properly. Summary You re probably eager to start exploring Xcode, but installing the software first is a necessary evil. As you ve seen, the process is relatively painless and quick. Now, on to the grand tour. 8