Datasheet

22
Getting Started
Developing for iOS
iOS development is more complicated than OS X development. Development is controlled by
provisioning, an Apple-generated security control, which is built into Xcode and manages
access to hardware testing and App Store distribution.
iPhone, iPod touch, and iPad platforms all use iOS, but these platforms are significantly different
and may not always run the same version of iOS. Even when they do run the same version, not
all hardware features and UI options are available on very device.
In extreme cases, conditional code is required to check which device an app is running on and
which version of iOS it supports. Code paths may need to be selected accordingly with manual
checks at runtime.
Apple is unlikely to simplify this process in future releases of Xcode. It’s more likely that the iOS
device range will expand, and apps will need to manage an ever-increasing selection of screen
sizes, hardware features, and operating systems.
The Xcode Simulator, shown in Figure 1.15, includes separate iPhone and iPad testing options,
but it is suitable only for apps that don’t use any of the iOS hardware features, such as the GPS
and the accelerometer. All but the very simplest commercial apps should be tested on real
hardware.
The extra requirements of provisioning and multi-platform support can make iOS development
feel challenging and complex. A further complication is the need to produce high-quality sup-
porting graphics and screen designs for maximum buyer impact in the App Store.
To date, Apple’s beta cycle for iOS has been more aggressive than for OS X, and it’s usual to
have a new beta preview of iOS available almost as soon as the most recent version has been
made public. Beta development requires a parallel version of Xcode and beta firmware for every
test device. It may also require an updated version of iTunes and OS X.
So although the iPhone and iPad are simpler than a Mac, and app code can be very much sim-
pler, you should allow extra time to work for projects to support all the different possible tar-
gets, versions, and security options.
Xcode supports these extra possibilities, but it doesn’t simplify them. Developing and testing a
universal iOS app—a single app that can run on an iPhone, an iPod, and an iPad—remains a
challenge.
05_9781118007594-ch01.indd 2205_9781118007594-ch01.indd 22 5/17/11 11:45 AM5/17/11 11:45 AM