Important: The information in this document is obsolete and should not be used for new development.
Xcode can help you at each step in the process of developing a software product. That includes steps such as researching Apple technologies; writing and compiling code; and building, linking, testing, debugging, and optimizing the software for your product. By taking a closer look at these steps, you’ll see how Xcode fits into the development process.
This section gives a brief overview of the software development process and how Xcode helps you at each stage in that process. Figure 1-1 shows the typical development process and how it relates to Xcode.
Briefly, the stages of the development process are as follows:
Define a product. The earliest stages in the creation of an application are conceptual; you decide what problem you are trying to solve and think about the best programmatic approach and the best interface design. You make fundamental decisions about the programming language you will use, the architecture of your application, and the Mac OS X technologies you will use. No matter what your decisions, chances are Xcode has a project template to support them.
Design your program. The design process doesn’t stop with your decisions about programming language, Mac OS X technology, and product type. If your product has a graphical user interface, you can use the Interface Builder application to design the user interface for your application. Xcode knows how to work with Interface Builder nib files; a nib file contains the resources that describe the various user interface elements in our program’s interface. When you double-click a nib file in the Xcode application, the Interface Builder application opens. For more information on Interface Builder, see Interface Builder Help.
If you are programming in an object-oriented language, Xcode’s design tools let you model classes in your application and entities that represent your data. The class modeling tool lets you understand the classes in your project, whether they’re written in Objective-C, C++, Java, or a mixture of those languages. The data modeling tool lets you diagram entities and the relationships between them, and define a schema for use with the Core Data framework. For more on Xcode’s design tools, see “Design Tools.”
Write source code. Once you have designed your program and user interface, you need to implement your design. Xcode’s editor has many features to facilitate your job, including code completion, direct linking to function, class, and method descriptions, support for syntax coloring, and many shortcuts for moving between files. For more on Xcode’s editor, see “Editing Source Files.”
Choose a version control system. Version control systems let you track changes to your source files. Using version control, several developers can work on the same project at the same time. Xcode works with three version control systems: Concurrent Versions System (CVS), Subversion, and Perforce. To learn more about using version control in Xcode, see “Version Control.”
Build your product. To create a program that you can run and test, you must first build the product. Building a product involves many steps, including compiling source files, linking object files, copying resource files, and more. Xcode includes a powerful build system that can build any Mac OS X software product. Xcode’s build system provides a user interface to industry-standard tools such as the GNU compiler collection. In addition, Xcode provides numerous opportunities to tailor the build process. To learn more about Xcode’s build system, see “The Build System.”
Debug and test your program. In most large application projects, debugging and tuning the code proceeds in parallel with implementation. Xcode includes a source-level debugger that provides a graphical user interface to the GNU debugger, GDB. GDB is a command-line debugger for C, Objective-C, C++, and Objective-C++ code. For more information on using GDB, see Debugging with GDB and GDB Quick Reference.
The Xcode application lets you step through your code line by line, set and modify breakpoints, view variables, stack frames, and threads, and access GDB directly through a command line.
In order to enhance your users’ perception of your application, you should minimize the application’s launch time, execution time, and memory footprint. Xcode Tools includes a number of tools, such as Shark, to help you achieve those goals. You can launch your program with many of these performance tools directly from Xcode. For more information on the performance tools included with Xcode Tools and on performance tuning in general, see Performance Overview.
Deploy your product. The last step in application development is bundling the various object files, frameworks, and data files into a package that can be installed by the user. Xcode automatically packages all of the files that it knows are part of the application. Whenever possible, you should package your application for drag-and-drop installation. When necessary, however, as when you want to let the user install a new version of an application over an old one without replacing all the files, you can use the PackageMaker application to create an installation package. Installer, located in /Applications/Utilities, is the native installer for Mac OS X. PackageMaker and Installer are documented in Software Delivery Guide.
Defining a Product
Creating a Project
Project Organization and Navigation
Editing Files
Resources and Localization
The Edit/Build/Debug Cycle
Analyzing and Optimizing Your Software
Customizing Your Work Environment
Last updated: 2006-11-07