Xcode includes numerous applications for writing code, creating resources, tuning your application, and delivering it to customers. At the heart of this group is the Xcode application, which most developers use on a daily basis. It provides the basic project and code management facilities used to create most types of software on Mac OS X. All of the tools are free and can be downloaded from the Apple developer website (see “Getting the Xcode Tools”).
In Mac OS X v10.5 and later, it is possible to install multiple versions of Xcode on a single computer and run the applications and tools from different versions side-by-side. The applications listed in the following sections are installed in <Xcode>/Applications, where <Xcode> is the root directory of your Xcode installation. The default installation directory for Xcode is the /Developer directory.
In addition to the applications listed here, Xcode also comes with numerous command-line tools. These tools include the GCC compiler GDB debugger, tuning tools, code management tools, performance tools, and so on. For more information about the available command-line tools, see “Command-Line Tools.”
Xcode
Interface Builder
Dashcode
Instruments
Quartz Composer
AppleScript Studio
Audio Applications
Graphics Applications
Java
Performance Applications
Utility Applications
The centerpiece of the Xcode Tools is the Xcode application, which is an integrated developer environment (IDE) with the following features:
A code editing environment that includes features such as syntax coloring, code completion, and symbol indexing; see“Xcode Editor”
Visual design tools for creating your application’s data model (see “Core Data Framework”)
An advanced documentation viewer for viewing and searching Apple documentation; see “Documentation Window”
A context-sensitive inspector for viewing information about selected code symbols; see “Research Assistant”
An advanced build system with dependency checking and build rule evaluation.
GCC compilers supporting C, C++, Objective-C, Objective-C++, Objective-C 2.0, and other compilers supporting Java and other languages
Integrated source-level debugging using GDB; see “Debugging Environment”
Distributed computing, enabling you to distribute large projects over several networked machines
Predictive compilation that speeds single-file compile turnaround times
Advanced debugging features such as fix and continue and custom data formatters
Advanced refactoring tools that let you make global modifications to your code without changing its overall behavior; see “Refactoring Tools”
Support for project snapshots, which provide a lightweight form of local source code management; see “Project Snapshots”
Support for launching performance tools to analyze your software
Support for integrated source-code management; see “SCM Repository Management”
AppleScript support for automating the build process
Support for the ANT build system, which can be used to build Java and WebObjects projects.
Support for DWARF and Stabs debugging information (DWARF debugging information is generated by default for all new projects)
Figure C-1 shows the Xcode project workspace and some key inspector windows. In the Xcode preferences, you can configure numerous aspects of the workspace to suit your preferred work style.
For information on how to use Xcode, see Xcode User Guide.
The Xcode editing environment is a high-performance code editor that includes many features that go beyond basic text editing. These features aim to help developers create better code faster and include the following:
High-performance for typing, scrolling, and opening files. The Xcode editor now opens and scrolls large source documents up to 10 times faster than before.
Code annotations display notes, errors, and warnings inline with the code itself, and not just as icons in the gutter. This provides a much more direct conveyance of where the problems in your code lie. You can control the visibility of annotations using the segmented control in the navigation bar.
Code folding helps you organize your source files by letting you temporarily hide the content of a method or function in the editor window. You can initiate code folding by holding down the Command and Option keys and pressing either the left or right arrow key. A ribbon to the left of the text shows the current nesting depth and contains widgets to fold and unfold code blocks.
Syntax coloring lets you assign colors to various code elements, including keywords, comments, variables, strings, class names, and more.
Code Sense code completion, a feature that shows you type a few characters and retrieve a list of valid symbol names that match those characters. Code Sense is fast and intuitive and is tuned to provide accurate completions, along with a “most likely” inline completion as you type. This feature is similar to the auto-completion features found in Mail, Terminal, and other applications.
In Xcode 3.0, there is no distinction between “Running” your executable and “Debugging” it. Instead, you simply build your executable and run it. Hitting a breakpoint interrupts the program and displays the breakpoint either in the current editor window or in the debugger window. Other features of the debugging environment include the following:
Debugging controls in editor windows.
A debugger HUD (heads-up-display), which is a floating window with debugger controls that simplifies the debugging of full-screen applications.
Variable tooltips. (Moving your mouse over any variable displays that variable’s value.)
Reorganization (and in some cases consolidation) of toolbar and menu items to improve space usage, while still keeping all the needed tools available.
Consolidation of the Standard I/O Log, Run Log, and Console log into the Console log window.
Support for a separate debugging window if you prefer to debug your code that way.
The Research Assistant is an inspector that displays documentation for the currently selected text (see Figure C-1). As the selection changes, the Research Assistant updates the information in its floating window to reflect the classes, methods, and functions you are currently using. This window shows the declaration, abstract, and availability information for the selection along with the framework containing the selected identifier, relevant documentation resources, and related methods and functions you might be interested in using.
The documentation window (Figure C-2) in Xcode provides an environment for searching and browsing the documentation. This window provides you with fast access to Apple’s developer documentation and gives you tools for searching its content. You can search by title, by language, and by content and can focus your search on the documents in a particular documentation set.
Documentation sets are collections of documents that can be installed, browsed, and searched independently. Documentation sets make it easier to install only the documentation you need for your development, reducing the amount of disk space needed for your developer tools installation. In addition to the Apple-provided documentation sets, third parties can implement their own documentation sets and have them appear in the Xcode documentation window. For information on how to create custom documentation sets, see Documentation Set Guide.
Xcode supports the management of multiple SCM repositories to allow you to perform tasks such as the following:
Initial checkout of projects
Tagging source files
Branching
Importing and exporting files
Xcode supports CVS, Subversion, and Perforce repositories.
Project snapshots provide a lightweight form of local source control for Xcode projects. Using this feature, you can take a “snapshot” of your project’s state at any point during development, such as after a successful build or immediately prior to refactoring your code. If after making subsequent changes you decide those changes were not useful, you can revert your project files back to the previous snapshot state. Because snapshots are local, your intermediate changes need never be committed to source control.
Xcode’s refactoring tools let you make large-scale changes to your Objective-C source code quickly and easily. Xcode propagates your change requests throughout your code base, making sure that the changes do not break your builds. You can make the following types of changes using the refactoring tools:
Rename instance methods
Create new superclasses
Move methods into a superclass
Convert accessor methods to support Objective-C 2.0 properties
Modernize appropriate for loops to use the new fast enumeration syntax introduced in Objective-C 2.0
Before making any changes to your code, Xcode’s refactoring tools automatically take a local snapshot of your project. This automatic snapshot means you can experiment with refactoring changes without worrying about irrevocably changing your project files. For more information on snapshots, see “Project Snapshots.”
The Build pane in the inspector organizes the build settings for the selected target, providing search tools to help you find particular settings. In Mac OS X v10.5, some particularly noteworthy additions to this pane include the following:
Per-architecture build settings. You can now set different build settings for each architecture (Intel, PowerPC) your product supports.
32-bit and 64-bit architecture checkboxes.
Xcode projects include a Compatibility pane in the project inspector that lets you determine whether you want an Xcode 3.0–only project or one that can be used by previous versions of Xcode. Marking a project as Xcode 3.0–only generates an alert whenever you try to use an Xcode feature that is not present in previous versions of the application.
The Interface Builder application provides a graphical environment for building the user interface of your Carbon and Cocoa applications. Using Interface Builder, you assemble the windows and menus of your application, along with the any other supporting objects, and save them in one or more resource files, called nib files. When you want to load a user interface element at runtime, you load the nib file. The Cocoa and Carbon infrastructure uses the data in the nib file to recreate the objects exactly as they were in Interface Builder, with all their attributes and inter-object relationships restored.
Although present in all versions of Mac OS X, the Interface Builder application received a significant overhaul in Mac OS X v10.5. Beyond the numerous cosmetic changes, the current version of Interface Builder includes numerous workflow and infrastructure changes too. The connections panel replaces the old technique for connecting objects in Cocoa nib files, making it possible to create multiple connections quickly without going back and forth between the inspector and the objects in your nib file. An improved library window helps you organize and find the components you use most frequently. Interface Builder includes a new plug-in model that makes it possible to create fully functional plug-ins in a matter of minutes. And most importantly, Interface Builder is more tightly integrated with Xcode, providing automatic synchronization of project’s class information with the corresponding source files.
Figure C-3 shows the Interface Builder environment in Mac OS X v10.5, including a nib document, connections panel, inspector window, and library window. The library window contains the standard components you use to build your user interfaces and includes all of the standard controls found in Carbon and Cocoa applications by default. Using plug-ins, you can expand the library to include your own custom objects or to include custom configurations of standard controls.
For information about Interface Builder features and how to use them, see Interface Builder User Guide. For information about how to integrate your own custom controls into Interface Builder, see Interface Builder Plug-In Programming Guide and Interface Builder Kit Framework Reference.
Introduced in Mac OS X v10.5, Dashcode is an integrated environment for laying out, coding, and testing Dashboard widgets. Although users see and use widgets as applications, they’re actually packaged webpages powered by standard technologies such as HTML, CSS, and JavaScript. Although it is easy for anyone with web design experience to build a widget using existing webpage editors, as a widget’s code and layout get more complex, managing and testing of that widget becomes increasingly difficult. Dashcode provides the following features to help simplify the widget design process:
A project manager to marshall your widget’s resources
Visual tools to design your widget interface
Tools to set metadata values, specify required images, and package your widget
A source code editor to implement your widget’s behavior
A debugger to help you resolve issues in your widget’s implementation
Figure C-4 shows the Dashcode canvas, inspector, and library windows. The canvas is a drag-and-drop layout environment where you lay out widgets visually. Using the inspector window, you can apply style information to the controls, text, and shape elements that you drag in from the library.
For more information about Dashcode, see Dashcode User Guide.
Introduced in Mac OS X v10.5, Instruments is an advanced debugging and performance analysis application. Instruments provides unprecedented information about the runtime behavior of your application and complements existing tools such as Shark. Rather than show one aspect of your program at a time, you configure each analysis session with one or more “instruments”, each of which gathers information about things such as object allocation patterns, memory usage, disk I/O, CPU usage, and many more. The data from all instruments is shown side-by-side, making it easier to see patterns between different types of information.
An important aspect of Instruments is the repeatability of data gathering operations. Instruments lets you record a sequence of events in your application and store them in the master track. You can then replay that sequence to reproduce the exact same conditions in your application. This repeatability means that each new set of data you gather can be compared directly to any old sets, resulting in a more meaningful comparison of performance data. It also means that you can automate much of the data gathering operation. Because events are shown alongside data results, it is easier to correlate performance problems with the events that caused them.
Figure C-5 shows the Instruments user interface for an existing session. Data for each instrument is displayed along the horizontal axis. Clicking in those data sets shows you information about the state of the application at that point in time.
For information about how to use Instruments, see Instruments User Guide.
Introduced in Mac OS X version 10.4, Quartz Composer is a development tool for processing and rendering graphical data. Quartz Composer provides a visual development environment (Figure C-6) built on technologies such as Quartz 2D, Core Image, OpenGL, and QuickTime. You can use Quartz Composer as an exploratory tool to learn the tasks common to each visual technology without having to learn its application programming interface (API). You can also save your compositions as resource files that can be loaded into a Cocoa window at runtime. In addition to supporting visual technologies, Quartz Composer also supports nongraphical technologies such as MIDI System Services and Rich Site Summary (RSS) file content.
For information on how to use Quartz composer, see Quartz Composer User Guide.
You can use AppleScript Studio to create AppleScript applications with complex user interfaces that support the Aqua human interface guidelines. AppleScript Studio is a combination of technologies, including AppleScript, Cocoa, the Xcode application, and Interface Builder.
For more information about AppleScript Studio, see AppleScript Studio Programming Guide or AppleScript Studio Terminology Reference.
The <Xcode>/Applications/Audio directory contains applications for Core Audio developers.
Introduced in Mac OS X version 10.4, AU Lab (Audio Unit Lab) lets you graphically host audio units and examine the results. You can use AU Lab to test the audio units you develop, do live mixing, and playback audio content. Parameters for the audio units are controlled graphically using the audio unit’s custom interface or using a generic interface derived from the audio unit definition. Figure C-7 shows the AU Lab interface and some of the palettes for adjusting the audio parameters.
Introduced in Mac OS X version 10.5, the HALLab (Hardware Abstraction Layer Lab) application helps developers test and debug audio hardware and drivers. You can use this application to understand what the audio hardware is doing and to correlate the behavior of your application with the behavior of the underlying audio driver. The application provides information about the properties of objects in the HAL and provides an I/O cycle telemetry viewer for diagnosing and debugging glitches your application’s audio content.
Table C-1 lists the applications found in the <Xcode>/Applications/Graphics Tools directory.
Application | Description |
|---|---|
Introduced in Mac OS X v10.5, this application provides an environment for testing the effects of Core Image filters. Using this application, you can build up a set of filters and apply them to an image or set of images. You can apply both static and time-based effects and change the parameters of each filter dynamically to see the results. | |
An application that displays extensive information about the OpenGL environment. | |
An application that creates a runtime profile of an OpenGL-based application. The profile contains OpenGL function-call timing information, a listing of all the OpenGL function calls your application made, and all the OpenGL-related data needed to replay your profiling session. | |
An application that provides real-time entry, syntax checking, debugging, and analysis of vertex/fragment programs. It allows you to export your creation to a sample GLUT application, which performs all the necessary OpenGL setup, giving you a foundation to continue your application development. OpenGL is an open, cross-platform, three-dimensional (3D) graphics standard that supports the abstraction of current and future hardware accelerators. For more information about OpenGL, see OpenGL Programming Guide for Mac OS X in the Reference Library > Graphics & Imaging area. | |
A magnifying glass utility for Mac OS X. Pixie is useful for doing pixel-perfect layout, checking the correctness of graphics and user interface elements, and getting magnified screen shots. | |
A utility for previewing Quartz Composer compositions. | |
This is an alias to the Quartz Debug application in the |
Table C-2 lists the applications found in the <Xcode>/Applications/Java Tools directory.
Application | Description |
|---|---|
An application that acts as a wrapper for running Java applets. | |
An application that allows you to package your Java program’s files and resources into a single double-clickable application bundle. Jar Bundler lets you modify certain properties so your Java application behaves as a better Mac OS X citizen and lets you specify arguments sent to the Java virtual machine (VM) when the application starts up. |
Table C-3 lists the applications found in the <Xcode>/Applications/Performance Tools directory.
Application | Description |
|---|---|
An application that presents statistics about the current system activity and lets you track those statistics over time. This application is a more visually oriented version of the top command-line tool. It provides information about CPU usage, disk and network throughput, memory usage, and others. For information on how to use this program, see the application help. | |
An application for measuring the dynamic memory usage of applications and for finding memory leaks. For information on how to use this program, see the application help or Memory Usage Performance Guidelines. | |
A debugging utility for the Quartz graphics system. For information on how to use this program, see the application help or Drawing Performance Guidelines. | |
An application that profiles the system to see how time is being spent. It can work at the system, task, or thread level and can correlate performance counter events with source code. Shark’s histogram view can be used to observe scheduling and other time-dependent behavior. It can produce profiles of hardware and software performance events such as cache misses, virtual memory activity, instruction dependency stalls, and so forth. For information on how to use this program, see the application help. | |
An application that samples applications automatically whenever they become unresponsive and display the spinning cursor. To use this application, you launch it and leave it running. Spin Control provides basic backtrace information while an application is unresponsive, showing you what the application was doing at the time. | |
An application for graphically displaying activity across a range of threads. It provides timeline color-coded views of activity on each thread. By clicking a point on a timeline, you can see a sample backtrace of activity at that time. | |
An application for analyzing memory usage. |
Table C-4 lists the applications in the <Xcode>/Applications/Performance Tools/CHUD directory and its subdirectories.
Application | Description |
|---|---|
An application that examines and modifies CPU and PCI configuration registers in PowerPC processors. | |
An application for finding performance counter events and their configuration. | |
An application that is an exact, function-level profiler for your application. Unlike sampling programs, which gather call stacks at periodic intervals, you can use this application to generate and view a complete function call trace of your application code. | |
An application that monitors the power state of hard drives connected to the computer. |
Table C-5 lists the applications found in the <Xcode>/Applications/Graphics Tools directory and its subdirectories.
Application | Description |
|---|---|
An agent application that lets you roll the mouse cursor over items in your application’s user interface and view their associated accessibility attributes and actions. | |
An application that looks for mistakes in the accessibility information provided by your application. | |
An application for discovering and getting information about Bluetooth devices. | |
An application for creating applets from Python scripts. | |
An application that displays the contents of the various system pasteboards. | |
An application for configuring the user notifications generated when an application crashes. | |
An application that compares two ASCII files or two directories. For a more accurate comparison, you can compare two files or directories to a common ancestor. After comparing, you can merge the files or directories. | |
An application to create a search index for a help file. Instructions for creating Apple Help and for using the indexing tool are in Apple Help Programming Guide. | |
An application for creating and examining icon resource files. | |
An application that you can use to examine the configuration of devices on your computer. IORegistryExplorer provides a graphical representation of the I/O Registry tree. For information on how to use this application, see I/O Kit Fundamentals. | |
iSync Plug-in Maker | This application creates device drivers that allow the synchronization of custom hardware devices. For more information, see “iSync Plug-in Maker.” |
PackageMaker | An application for creating installable application packages from the set of files you provide. |
An application for logging Bluetooth packets. | |
An application that lets you read and edit the contents of a property list. A property list, or plist, is a data representation used by Cocoa and Core Foundation as a convenient way to store, organize, and access standard object types. Property lists are useful when you need to store small amounts of persistent data. If you do use property lists, the | |
An application designed to improve the pronunciation of text generated by the Text-To-Speech system. | |
An application for building language models for use with the Speech Recognition manager. | |
A debugging application you use to inspect the truth database, the call history of sync sessions, and clients of the synchronization engine. For information on how to use this application, see Sync Services Tutorial. | |
An application that displays detailed information about all the USB ports and devices on the system. |
The iSync Plug-in Maker application is a tool that allows you to build, test, and release plug-ins that handle the specific features supported by your hardware device. You use this application to configure your device settings and write scripts for connecting it to the Internet. The application also provides a suite of standard automated tests that you can use to detect and fix problems in your plug-in before you ship it.
Figure C-8 shows the iSync Plug-in Maker edit window.
For information about using iSync Plug-in Maker, see iSync Plug-in Maker User Guide.
You use PackageMaker to create installation packages for your software. An installation package is a convenient way to deliver software in all but the simplest cases. An installation package contains the files to install, their locations, and any licensing information or supporting materials that go with your software. When the user double-clicks an installation package, Mac OS X automatically launches the Installer application, which proceeds to install the files contained in the package.
You can use PackageMaker to package files or to assemble individual packages into a single package. Figure C-9 shows the PackageMaker user interface, which provides a graphical environment for building your packages.
For information on how to use PackageMaker, see PackageMaker User Guide.
Last updated: 2007-10-31