iOS Developer Tools

To develop applications for iOS, you need an Intel-based Macintosh computer and the Xcode tools. Xcode is Apple’s suite of development tools that provide support for project management, code editing, building executables, source-level debugging, source-code repository management, performance tuning, and much more. At the center of this suite is the Xcode application itself, which provides the basic source-code development environment. Xcode is not the only tool, though, and the following sections provide an introduction to the key applications you use to develop software for iOS.

Xcode

The focus of your development experiences is the Xcode application. Xcode is an integrated development environment (IDE) that provides all of the tools you need to create and manage your iOS projects and source files, assemble your user interface, build your code into an executable, and run and debug your code either in iOS Simulator or on a device. Xcode incorporates a number of features to make developing iOS applications easier, including the following:

To create a new iOS application, you start by creating a new project in Xcode. A project manages all of the information associated with your application, including the source files, build settings, and rules needed to put all of the pieces together. The heart of every Xcode project is the project window, shown in Figure A-1. This window provides quick access to all of the key elements of your application. In the Groups & Files list, you manage the files in your project, including the source files and build targets that are created from those source files. In the toolbar, you access commonly used tools and commands. You can then configure the workspace to display the panes you need for editing, navigating your project content, debugging, and obtaining additional information about items.

Figure A-1  An Xcode project window
An Xcode project windowAn Xcode project window

When you build your application in Xcode, you have a choice of building it for iOS Simulator or for a device. Simulator provides a local environment for testing your applications to make sure they behave essentially the way you want. After you are satisfied with your application’s basic behavior, you can tell Xcode to build your application and run it on an iOS-based device connected to your computer. Running your application on a device provides the ultimate test environment, and Xcode lets you attach the built-in debugger to the code running there.

Figure A-2  Running a project from Xcode
Running a project from XcodeRunning a project from Xcode

For details on how to build and run your project on iOS, see Tools Workflow Guide for iOS. For more information about the Xcode environment, see Xcode User Guide.

Instruments

To ensure that you deliver the best user experience for your software, the Instruments environment lets you analyze the performance of your iOS applications while running in Simulator or on a device. Instruments gathers data from your running application and presents that data in a graphical display called the timeline view. You can gather data about your application’s memory usage, disk activity, network activity, and graphics performance. The timeline view can display all the types of information side by side, letting you correlate the overall behavior of your application, not just the behavior in one specific area. To get even more detailed information, you can also view the detailed samples that Instruments gathers.

Figure A-3  Using Instruments to tune your application
Using Instruments to tune your applicationUsing Instruments to tune your application

In addition to providing the timeline view, Instruments provides tools to help you analyze your application’s behavior over time. For example, the Instruments window lets you store data from multiple runs so that you can see whether your application’s behavior is actually improving or whether it still needs work. You can save the data from these runs in an Instruments document and open them at any time.

For details on how to use Instruments with iOS applications, see Tools Workflow Guide for iOS. For general information on how to use Instruments, see Instruments User Guide.

The Developer Library

The iOS Developer Library contains the documentation, sample code, tutorials, and other information you need to write iOS applications. Because the developer library contains thousands of pages of documentation, ranging from high-level getting started documents to low-level API reference documents, understanding how to find the information is an important step in the development process. The developer library uses a few techniques for organizing content that should make it easier to browse.

You can access the iOS Developer Library from the Apple Developer website or from Xcode. In Xcode, choosing Help > Developer Documentation displays the Xcode documentation window, which is the central resource for accessing information about iOS development. You can use this window to browse the documentation, perform searches, and bookmark documents you may want to refer to later.

When you install the iOS SDK, Xcode automatically makes the iOS Developer Library available for you to use. (Xcode also downloads updates for you automatically, although you can change that setting in preferences.) The iOS Developer Library contains a lot of information so it is worth becoming at least somewhat familiar with its layout. Figure A-4 shows the main page of the developer library in the Xcode documentation window. The toolbar at the top of the page includes a search field and buttons for navigating around the documentation. You can browse the library by topic, by framework, or by the type of resource you are looking for. You can also use the filter field above the list of documents to narrow the set of displayed documents.

Figure A-4  The iOS Developer Library
The iPhone Reference LibraryThe iPhone Reference Library

Because the developer library provides a tremendous amount of information, sorting through all that information while you are trying to write code can be cumbersome. To help you find specific information quickly, Xcode also provides a Quick Help pane in the Utilities section of the main project window. This pane shows you information about the designated symbol, including its syntax, description, and availability. It also shows you any related documentation and sample code resources. Clicking the links in this pane takes you to the corresponding resource in the developer library.

For more information about using the Documentation and Quick Help windows, see Xcode User Guide.


Did this document help you? Yes It's good, but... Not helpful...