Important: The information in this document is obsolete and should not be used for new development.
Before you plunge headlong into working with the project that you have just created, it’s a good idea to familiarize yourself the many ways in which you can organize and quickly access project information and items. Xcode provides many different ways for you to view, organize, and find information in your project, so you can work efficiently.
Organizing a Project
Project Navigation
Finding Information
Using the Documentation
The Xcode project is the primary mechanism for grouping the files and information you need to build one or a set of related products. Within a project, a target specifies the files and other information needed to build a specific product. In addition, Xcode provides groups, as a way to organize information within a project, and to navigate to project files, symbols, and so on.
Xcode defines groups for source code, targets, errors and warnings, bookmarks and other items. You can also create your own groups to help you organize information in ways that make sense to you. To learn more about groups in Xcode, see “Groups in Xcode.”
“Organizing Xcode Projects” provides a detailed look at the high-level issues involved in organizing complex projects and targets. It includes “Organizing Files,” which provides a more detailed look at working with groups.
Xcode provides convenient navigation at several levels, whether you’re editing source code in multiple files, looking up technical documentation, building, debugging, or performing other tasks.
The project window, described in “The Project Window,” offers several options for navigation:
You can find any project file by first selecting the project group (which reveals a list of all the files in the project), then use filtered searching to find the file you’re looking for.
You can define bookmarks to access specific file locations, then use the Bookmarks group to locate specific bookmarks.
You can use the Project Symbols group to find a method or function and go directly to its source code.
You can use the Errors and Warnings group to go directly to the specific line in your code where an error occurred.
To examine the hierarchy of classes defined in object-oriented languages, Xcode provides a class browser. Using the browser, you can navigate to code (both for Apple frameworks and for classes you have defined) and documentation.
Xcode also provides options for jumping between header and implementation files, jumping to methods or functions within a file, or instantly opening a selected or typed filename. And you can locate text by performing single-file or batch find operations, described in “Searching in a Project.”
An IDE should help you find the information you need while you’re working on a project. Here are some ways to search for information in Xcode.
Filtered searching is available in many places across the Xcode user interface. It refers to the ability to type letters in a search field so that as you type, Xcode filters an associated list, removing any items that don’t match the text you type.
For example, filtering is available in the project window for items such as files, symbols, and errors and warnings; in Info windows (described below) for build settings; and in the Developer Documentation window for symbol names defined by various Mac OS X technologies.
Searching for text in your project is a common task that must be fast and convenient. In Xcode, you can perform search and replace operations in a single file, or perform batch searches on multiple files and frameworks. You can search for text, regular expressions, or symbol definitions. You can also define complex search criteria to reuse, and you can store your search results for later reference. To learn more about searching in Xcode projects, see “Searching in a Project.”
The project window is the main starting point for getting information about items in your project. For most kinds of information, you won’t need more than a few steps:
Select an item in the project window.
If you need more information about a selected item, open an Info window (by pressing Command-I, choosing Get Info from the File menu, or clicking the Info button in the project window toolbar).
An Info window allows you to view, and in some cases modify, information on items in your project. For example, you can view and change file attributes for one or more selected files. To learn more about Info windows, see “Inspector and Info Windows.”
The importance of documentation in software development can’t be overemphasized. The technical documentation distributed with Xcode provides critical conceptual and reference documentation for creating high-quality, high-performance software for Mac OS X.
At different times in the product cycle, you’re likely to use the documentation to:
Learn about the operating system and the technologies it supports
Find and compare solutions for technical requirements
Read about supported languages and frameworks
Look up individual API definitions
Learn how to use a required tool
When you install Xcode, technical documentation is installed on your hard drive. You can view it in the Developer Documentation window, accessed through the Help menu.
The Mac OS X documentation distributed with Xcode includes both Apple and open source documentation. Xcode also includes a variety of sample code, installed at /Developer/Examples. Documentation and sample code are also available, free of charge, at the Apple Developer Connection website at http://developer.apple.com. To learn more about viewing documentation in Xcode, see “Viewing Documentation.”
Apple provides the open source HeaderDoc system for creating HTML reference documentation from embedded comments in C, C++, and Objective-C header files. Similar to JavaDoc, the system allows you to document your interfaces and export that information into HTML. For more information on HeaderDoc, see http://developer.apple.com/darwin/projects/headerdoc/.
Last updated: 2006-11-07