< Previous PageNext Page > Hide TOC

The Xcode Development Process

As described in “The Xcode Environment,” Xcode is a suite of software development tools used to create Mac and iPhone applications. The centerpiece of this suite is the Xcode application, which you use to organize and edit your source files, view documentation, build your product, debug your code, and optimize your product’s performance.

The Xcode application development process is made up of several tasks:

  1. Configure your development environment.

    Xcode lets you customize your development environment in many ways, including the layout of the project window, the workings of the text editor used to edit source code, the content that appears in the Documentation window, the keyboard shortcuts for menu commands, and many more.

    To learn about customizing your working environment, see Xcode Workspace Guide.

  2. Create your project.

    Xcode provides several project templates that get you started. You choose the template that implements the type of application (or other type of product) you want to develop.

    To learn more about creating Mac applications, see Creating Projects. “Creating a Project” in iPhone Development Guide shows how to create an iPhone application.

  3. Design the user interface.

    Interface Builder lets you design your application’s user interface graphically and save those designs as resource files that your program loads at runtime.

    To learn more about creating user interfaces with Interface Builder, see Interface Builder User Guide.

  4. Write code.

    Xcode provides several features that help you write code fast, including class and data modeling, code completion, direct access to documentation, source-code refactoring, and more. See Xcode Workspace Guide to learn more about these features.

  5. Build and run your application.

    When developing Mac applications, you generally build and run them on your development computer (see Xcode Project Management Guide for details). iPhone applications, on the other hand, run in iPhone Simulator application or on an iPhone OS–based device.

    iPhone Simulator: 

    iPhone Simulator implements the iPhone OS API in a Mac application, providing a runtime environment that mimics the environment devices provide. By allowing you to run your applications in Mac OS X, the simulator provides a way to quickly test your application’s functionality without the need for an actual device. However, running applications on the simulator is not the same as running them on devices.

    The simulator uses Mac OS X versions of the low-level iPhone OS frameworks instead of the versions that run on devices. But, in general, the simulator is a great tool for performing initial testing of your application. Keep in mind that, because the simulator does not emulate device functionality, you must always perform final testing and performance analysis of your application on actual devices.

    To learn more about building and running iPhone applications, see “Creating a Project” in iPhone Development Guide.

    To compile and debug your code, Xcode relies on the open-source tools GCC and GDB.

  6. Unit-test your code.

    Performing unit tests on your code is important to ensure that no errors or bugs are introduced as you make changes and improvements to the implementation of your application’s functionality. Xcode provides an easy-to-use unit-test environment with which you can test Objective-C and C++ code.

    Note: The Xcode unit-testing environment does not support iPhone applications.

    To learn more about unit testing in Xcode, see Xcode Unit Testing Guide.

  7. Measure and tune your application’s performance.

    There are several tools available for you to gather performance data about your application and to improve your application’s performance.

    Instruments is a dynamic performance analysis tool that lets you peer into your code as it’s running and gather important metrics about what it’s doing. You can view and analyze the data Instruments collects in real time, or you can save that data and analyze it later. You can collect data about your application’s use of the CPU, memory, file system, and the network, among other resources. See Instruments User Guide for details.

    Shark is another tool that helps to find performance bottlenecks in your code. It produces profiles of hardware and software performance events and shows how your code works as a whole and its interaction with the operating system. For more information, see Shark User Guide.



< Previous PageNext Page > Hide TOC


© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-01-06)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.