Datasheet

24
Getting Started
The development workflow is almost completely distinct. The two platforms have these
features:
A separate collection of classes for UI design and for data management: Many of
the more creative and sophisticated classes in OS X are either absent or only partially
implemented in iOS.
A separate testing and debugging environment: iOS applications can run in a
Simulator or on a hardware device. OS X applications run in a debugging sandbox.
A different core programming model: iOS supports task switching with very limited
multi-tasking, and limited access to the device file system. OS X supports a wider range
of multi-tasking options, and less restricted access to files.
Separate documentation suites: iOS and OS X have separate collections of docu-
mentation and distinct source code examples.
Different accelerated graphics frameworks: OS X implements OpenGL in full, iOS
implements the simpler OpenGL ES framework.
Different project templates for separate bare-bones starter application sketches:
iOS includes a set of sketches for simple UI-driven handset apps. OS X includes a more
complex collection of templates that support the development of plug-ins, screen-sav-
ers, and other libraries.
A partially distinct set of supported instruments for testing: Limited overlap exists,
but some instruments remain unique to each platform.
Apple’s Model-View-Controller design pattern implies that applications should keep UI designs,
UI management code, and underlying data collections distinct. OS X includes controller classes
that make it easier to manage data and create UIs to work with it. Most of these classes are
absent in iOS. This makes it difficult to use MVC effectively when attempting dual-platform
development.
If you plan to develop across platforms, try to package the underlying data model into its own
collection of classes. You may be able to reuse these classes without major changes. Keep UI
and UI management code elsewhere.
Generally, combined iOS and OS X remain possible but difficult. It’s more realistic to think of
Xcode 4 as two separate development environments with a common frontend than as a single
unified environment designed to produce code for either platform.
Summary
This chapter explained how previous Mac development tools led to Xcode, listed the key design
goals of Xcode 4, and summarized the key differences between Xcode 4 and Xcode 3. It intro-
duced some of the practical differences in more detail and looked at some of the new features.
Finally, it explored the fundamental differences between iOS and OS X development and briefly
discussed how those differences affect the development workflow.
05_9781118007594-ch01.indd 2405_9781118007594-ch01.indd 24 5/17/11 11:45 AM5/17/11 11:45 AM