Getting Started with iOS -4
Programming:
Welcome to the world of iPhone programming! That you are now holding this Blogs shows
that you are fascinated with the idea of developing your own iPhone (and iPad) applications
and want to join the ranks of the tens of thousands of developers whose applications are
already deployed in the App Store.
that you are fascinated with the idea of developing your own iPhone (and iPad) applications
and want to join the ranks of the tens of thousands of developers whose applications are
already deployed in the App Store.
Successful programming requires that you first know your tools well. Indeed, this couldn’t be more true for iPhone programming — you need to know quite a few tools before you can even get started.
Hence, this chapter describes the various relevant tools and information you need to jump on
the iPhone development bandwagon.Without further ado, it’s time to get down to work.
Hence, this chapter describes the various relevant tools and information you need to jump on
the iPhone development bandwagon.Without further ado, it’s time to get down to work.
Obtaining the iphone SDK:
To develop for the iPhone, you first need to sign up as a registered iPhone developer at http://developer
.apple.com/iPhone/program/start/register/. Registration is free and provides you with access to the
iPhone SDK (software development kit) and other resources that are useful for getting started.
.apple.com/iPhone/program/start/register/. Registration is free and provides you with access to the
iPhone SDK (software development kit) and other resources that are useful for getting started.
After signing up, you can download the iPhone SDK.
Before you install the iPhone SDK, make sure you satisfy the following system requirements:
1 Only Intel Macs are supported, so if you have another processor type (such as the older G4
or G5 Macs), you’re out of luck.
or G5 Macs), you’re out of luck.
2. Your system is updated with the latest Mac OS X release.
An actual iPhone/iPad is highly recommended, although not strictly necessary. To test your application,
you can use the included iPhone Simulator (which enables you to simulate an iPhone or an
iPad). However, to test certain hardware features like GPS, the accelerometer, and such, you need to
use a real device.
When the SDK is downloaded, proceed with installing it (see Figure 1-2). Accept a few licensing
agreements and then select the destination folder in which to install the SDK.
you can use the included iPhone Simulator (which enables you to simulate an iPhone or an
iPad). However, to test certain hardware features like GPS, the accelerometer, and such, you need to
use a real device.
When the SDK is downloaded, proceed with installing it (see Figure 1-2). Accept a few licensing
agreements and then select the destination folder in which to install the SDK.
the /Developer/Applications folder
Components of the iPhone SDK:
The iPhone SDK includes a suite of development tools to help you create applications for your iPhone,
iPod touch, and iPad. It includes the following:
➤➤ Xcode — Integrated development environment (IDE) that enables you to manage, edit, and
debug your projects
➤➤ Dashcode — Integrated development environment (IDE) that enables you to develop webbased
iPhone and iPad applications and Dashboard Widgets. Dashcode is beyond the scope
of this book.
➤➤ iPhone Simulator — Provides a software simulator to simulate an iPhone or an iPad on your Mac.
➤➤ Interface Builder — Visual editor for designing user interfaces for your iPhone and iPad
applications
➤➤ Instruments — Analysis tool to help you both optimize your application and monitor for
memory leaks in real time
The following sections discuss each tool (except Dashcode) in more detail.
Xcode
To launch Xcode, double-click the Xcode icon located in the /Developer/Applications folder (refer to
Figure 1-3). Alternatively, go the quicker route and use Spotlight: Simply type Xcode into the search box
and Xcode should be in the Top Hit position.
Figure 1-4 shows the Xcode Welcome screen.
Figure 1-4 shows the Xcode Welcome screen.
