Wiley 978-0-470-55651-1 Datasheet

Browse online or download Datasheet for Software manuals Wiley 978-0-470-55651-1. Wiley iPhone OS Development: Your visual blueprint for developing apps for Apple's mobile devices User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 24
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
2
Introducing iPhone
OS Devices
T
he iPhone, iPod touch, and iPad combine
innovative new computing technologies with a
completely new business model. Technologically,
developing for the iPhone family is challenging but
rewarding. The development environment is loosely based
on the Mac, with some extensions and limitations, but
the user environment is innovative and encourages
creative and novel experiences.
If you are a Mac developer, you will find many concepts
familiar and can likely start iPhone development after a
brief reorientation. If you are new to the Apple
development environment, give yourself a few weeks to
master the principles and programming models. This
book includes key concepts with worked examples.
Combined with Apple’s documentation, they will enable
you to move rapidly toward understanding and creating
your own applications.
The iPhone OS documentation lists thousands of objects,
message definitions, and function calls. The biggest
challenge for new developers is learning which messages
are used to signal which event. The second-biggest
challenge is mastering the syntax of each call to the OS.
Every message type uses a different syntax, with different
data structures and access methods.
Fortunately, Apple’s code samples include generous
amounts of boilerplate code. When you begin developing
applications, you can copy this boilerplate to your own
projects and reuse it with minor edits. As you gain
experience, you can begin to customize it and extend it
to meet your own requirements. You will also learn how
to add custom messages and message handlers of your
own design.
The App Store Advantage
Apple’s App Store is a key advantage because Apple
distributes your app and does significant marketing for
you. The ideal iPhone application is simple and elegant,
and its development is tightly focused, which means
development cycles can take months as opposed to years.
Therefore, you see the benefit from your development work
more quickly than you would from a typical desktop
product, and the cost of entry in both time and capital is
significantly lower.
Apple’s iPhone SDK is free. To download it, you must sign
up as a developer at http://developer.apple.com/iphone.
Registrations are typically approved within 24 hours. If you
decide to distribute or sell your applications through the
App Store or test them on your own iPhone rather than
theSDK Simulator, you must pay Apple $99 to join the
Standard Developer Program. Individuals should allow a
month for signup. Small businesses should allow two
months.
The App Store model is not perfect. You must allow two
weeks for testing of each submitted application, and not all
applications are accepted. There is no way to check if your
application will be approved ahead of submission. In the
past, Apple has blocked applications that compete with its
own products because its air-time partners have refused to
support them or for other reasons that remain inscrutable.
However, most applications are accepted. Many are
profitable. Some become very profitable indeed.
Web Apps and Native Apps
This book includes information about developing native
applications. However, web applications remain an
interesting option on the iPhone. When the iPhone was
first released, no native SDK was available. All applications
were developed as web apps for the iPhone’s Mobile Safari
browser, which was optionally supported by server-side
data management.
Web apps blend HTML, CSS, JavaScript, and AJAX to
create an interface that mimics the iPhone’s native
interface. Flash is not supported. Web apps are not listed
in the App Store, but you can submit them to Apple, which
lists them in a dedicated area on the Apple web site. You
can also direct users to your web app within Mobile Safari
via a standard URL.
If you are familiar with web technologies and if your
application is relatively simple, you will find it is easier and
faster to create an iPhone web app than a native
application. The disadvantages of apps are limited
performance and limited support for the iPhone’s enhanced
hardware features. Unlike stand-alone applications, most
web apps do not work offline. Web apps are not covered in
detail in this book. They remain a legacy option for projects
that aggregate and summarize web information and
manage user interaction with web data.
03_556511-ch01.indd 203_556511-ch01.indd 2 2/24/10 9:52 PM2/24/10 9:52 PM
COPYRIGHTED MATERIAL
Page view 0
1 2 3 4 5 6 ... 23 24

Summary of Contents

Page 1 - COPYRIGHTED MATERIAL

2Introducing iPhone OS DevicesThe iPhone, iPod touch, and iPad combine innovative new computing technologies with a completely new business model. Tec

Page 2 - User Expectations

11Chapter 1: Introducing iPhone OS DevicesUnderstanding Xcode’s Work AreasThe Groups & Files ListThe Groups & Files list is the key to managin

Page 3 - Install the

1224351 Select a sample application from the documentation. Note: See the section earlier in this chapter for more on finding sample source code.2 C

Page 4

13Chapter 1: Introducing iPhone OS Devices6897To test applications on a real iPhone, you will need to provision it. To provision a phone, you must sig

Page 5 - Introducing Xcode

14234563 If it is not already selected, click Application. 4 Choose a template. 5 Review a brief description of the template and its features. 6 C

Page 6 - Dashcode

15Chapter 1: Introducing iPhone OS Devices0987You can get the most from templates by creating your own. With custom templates, you can move beyond the

Page 7 - Code Libraries

16125344 Type a curly open bracket ({) and then type Return. Code Sense automatically indents the cursor on the next line. 5 Type if. Code Sense

Page 8

17Chapter 1: Introducing iPhone OS Devices6789You can use a shortcut to select from the list of possible options offered by Code Sense. Instead of nar

Page 9 - Introducing Xcode’s

1823584671 Open Xcode and then load the Hello World application. 2 Click HelloWorldAppDelegate.m. The contents of HelloWorldAppDelegate.m appear in

Page 10 - Work Areas

19Chapter 1: Introducing iPhone OS Devices0!@9In addition to bookmarks and navigation shortcuts, Xcode includes a Favorites feature. To show the Favor

Page 11 - Application

202356475 Choose the Debug build option from the Compiler Configuration drop-down menu.6 Click the Breakpoints switch to select it if it is not alre

Page 12

3Chapter 1: Introducing iPhone OS DevicesThe iPhone OS Product RangeiPhone OS devices include the iPhone, iPhone 3G, iPhone 3GS, iPod touch, and iPad.

Page 13 - Project Template

21Chapter 1: Introducing iPhone OS Devices89@!0#Xcode’s console is usually hidden. You can show it by choosing Run➔Console in Xcode. To send messages

Page 14

222344 Choose Run➔Run with Performance Tool➔Leaks to load the memory leak profiler. The Simulator loads the application and runs it, and the Leaks a

Page 15 - Auto-Completion Features

23Chapter 1: Introducing iPhone OS Devices86957The Instruments tool is modular. The presets listed in the Instruments menu display one or two monitori

Page 16

24312546 Choose Xcode➔Preferences to view the Xcode Preferences dialog box. 2 Click one of the preferences categories to view and change the setting

Page 17 - Pop-Ups and Bookmarks

25Chapter 1: Introducing iPhone OS Devices!9780@Xcode does not include features for copying or renaming projects. You can typically copy a project by

Page 18

426153 41 Open a web browser and navigate to http://developer.apple.com and then follow the links to find the most current enrollment page. Note: App

Page 19 - Your Code

5Chapter 1: Introducing iPhone OS Devices78@90$#The current cost of professional developer enrollment is $99 for individual developers and small busin

Page 20

6You can develop applications for the iPhone and iPad with Xcode — Apple’s iPhone and Mac development environment. Xcode requires an Intel-compatible

Page 21 - Profile and Improve

7Chapter 1: Introducing iPhone OS DevicesXcode and GCCXcode is based on a modified version of the Gnu Compiler Collection (GCC) and includes support f

Page 22

823143 Click Sample Code under the Resource Types header in the left-hand pane. • A list of sample code examples appears in the Documents pane of th

Page 23 - Preferences and Settings

9Chapter 1: Introducing iPhone OS Devices659078Further examples of source code are available from various sources online. One of the most useful is th

Page 24

10Introducing Xcode’s Work AreasIntroducing Xcode’s Work AreasAIHGFECDBD Detail ViewThe Detail View shows the item or items selected in the Groups &am

Comments to this Manuals

No comments