Beginning iOS 5 Application Development

Overview

The ideal starting point for iPhone and iPad app development with iOS 5

If you want to develop apps for Apple's iPhone and iPad, first you need to know how to use the tools--iPhone's new iOS 5 operating system and SDK, and the new xCode toolset that come with it. This full-color book is the perfect starting point. Beginning developers, you'll get a solid introduction to the new xCode 4 and Objective-C and find everything you need to quickly build your first app. The book ...

See more details below
Available through our Marketplace sellers and in stores.

Pick Up In Store Near You

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (17) from $1.99   
  • New (7) from $3.14   
  • Used (10) from $1.99   
Close
Sort by
Page 1 of 1
Showing 1 – 6 of 7
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$3.14
Seller since 2008

Feedback rating:

(1752)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
2012 Paperback New Ships out next day, click expedited for faster shipping.

Ships from: cadiz, KY

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$3.99
Seller since 2008

Feedback rating:

(4400)

Condition: New
1118144252 SHIPS WITHIN 24 HOURS!! (SAME BUSINESS DAY) GREAT BOOK!!

Ships from: BAY SHORE, NY

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$5.89
Seller since 2014

Feedback rating:

(0)

Condition: New
PAPERBACK New 1118144252 Ship 6 days a week with tracking. Most orders are shipped in 24 hrs.

Ships from: port charlotte, FL

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$27.64
Seller since 2010

Feedback rating:

(72)

Condition: New
New Ships from the UK. BRAND NEW Your purchase also supports literacy charities. *****PLEASE NOTE: This item is shipping from an authorized seller in Europe. In the event that a ... return is necessary, you will be able to return your item within the US. To learn more about our European sellers and policies see the BookQuest FAQ section***** Read more Show Less

Ships from: Dunfermline, United Kingdom

Usually ships in 1-2 business days

  • Canadian
  • Standard, 48 States
  • Standard (AK, HI)
$33.98
Seller since 2008

Feedback rating:

(278)

Condition: New
1118144252 New item in stock, may show minimal wear from storage. No remainder mark. I ship daily and provide tracking! 100% Money Back Guarantee!

Ships from: FORT MYERS, FL

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$33.98
Seller since 2013

Feedback rating:

(3)

Condition: New
PAPERBACK New 1118144252 New item in stock, may show minimal wear from storage. No remainder mark. I ship daily and provide tracking! 100% Money Back Guarantee!

Ships from: LEHIGH ACRES, FL

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 1
Showing 1 – 6 of 7
Close
Sort by
Sending request ...

Overview

The ideal starting point for iPhone and iPad app development with iOS 5

If you want to develop apps for Apple's iPhone and iPad, first you need to know how to use the tools--iPhone's new iOS 5 operating system and SDK, and the new xCode toolset that come with it. This full-color book is the perfect starting point. Beginning developers, you'll get a solid introduction to the new xCode 4 and Objective-C and find everything you need to quickly build your first app. The book thoroughly covers all the new iOS 5 features, including new multitasking, location-based services, notification system, cloud-based features, and much more.

  • Written by bestselling Wrox author, Wei-Meng Lee, this is an ideal book for beginning developers
  • Helps eager developers quickly start building apps for the iPhone, iPad, and iPod Touch
  • Introduces iOS 5, xCode 4, Objective-C, and the basics you need to create your first Apple device app
  • Covers a host of new iOS 5 capabilities, including new multitasking, new location-based services, and a new notification system
  • Shows you how to work with iOS 5's cloud-based features for online storage of music, photos, and video

Full-color and full of information, Beginning iOS 5 Application Development is the ultimate guide for beginning Apple developers.

Read More Show Less

Product Details

  • ISBN-13: 9781118144251
  • Publisher: Wiley
  • Publication date: 1/24/2012
  • Edition number: 1
  • Pages: 656
  • Product dimensions: 7.40 (w) x 9.10 (h) x 1.40 (d)

Meet the Author

Wei-Meng Lee is the founder of Developer Learning Solutions (www.learn2develop.net), a technology company specializing in hands-on training in the latest Microsoft and Apple technologies. He writes extensively for online publications and magazines on topics such as iPhone and Mac OS X development and is the author of Beginning iOS 4 Application Development and Beginning Android Application Development.
Read More Show Less

Read an Excerpt

Beginning iOS 5 Application Development


By Wei-Meng Lee

John Wiley & Sons

Copyright © 2012 John Wiley & Sons, Ltd
All right reserved.

ISBN: 978-1-1181-4425-1


Chapter One

Getting Started with iOS 5 Programming

WHAT YOU WILL LEARN IN THIS CHAPTER

* How to obtain the iOS SDK - Software Development Kit

* Components included in the iOS SDK

* Features of the development tools — Xcode, Interface Builder, and iOS Simulator

* Capabilities of the iOS Simulator

* Architecture of iOS

* Characteristics of the iPhone and iPad

Welcome to the world of iOS programming! That you are now holding this book 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.

As the Chinese adage says, "To accomplish your mission, first sharpen your tools." Successful programming requires that you first know your tools well. Indeed, this couldn't be truer for iOS programming — you need to be familiar with 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 iOS development bandwagon.

Without further ado, it's time to get down to work.

OBTAINING THE TOOLS AND SDK

To develop for iOS, you need to download the iOS SDK. The iOS SDK comes with free Xcode from the Mac App Store (see Figure 1-1).

Before you download and install Xcode, make sure you satisfy the following system requirements:

* 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.

* Your system is updated with the latest Mac OS X Lion release.

An actual iPhone/iPod touch/iPad is highly recommended, although not strictly necessary. To test your application, you can use the included iOS Simulator (which enables you to simulate an iPhone or an iPad). However, to test certain hardware features like the accelerometer and gyroscope, you need to use a real device.

When Xcode is downloaded, proceed with installing it. Accept a few licensing agreements and then select the destination folder in which to install the SDK.

If you select the default settings during the installation phase, the various tools will be installed in the /Developer/Applications folder (see Figure 1-2).

COMPONENTS OF XCODE

The Xcode package includes a suite of development tools to help you create applications for your iPhone, iPod touch, and iPad. It includes the following:

* Xcode IDE — Integrated development environment (IDE) that enables you to manage, edit, and debug your projects

* Dashcode — Integrated development environment (IDE) that enables you to develop web-based iPhone and iPad applications and Dashboard widgets. Dashcode is beyond the scope of this book.

* iOS 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-2). Alternatively, go the quicker route and use Spotlight: Simply type Xcode into the search box and Xcode should be in the Top Hit position.

Using Xcode, you can develop different types of iPhone, iPad, and Mac OS X applications using the various project templates shown in Figure 1-4.

For iOS applications, each template gives you the option to select the platform you are targeting — iPhone, iPad, or Universal (runs on both iPhone and iPad). The IDE in Xcode provides many tools and features that make your development life much easier.

One such feature is Code Sense, which displays a popup list showing the available classes and members, such as methods, properties, and so on.

NOTE For a more comprehensive description of some of the most commonly used features in Xcode, refer to Appendix B.

iOS Simulator

The iOS Simulator, shown in Figure 1-5, is a very useful tool that you can use to test your application without using your actual iPhone/iPod touch/iPad. The iOS Simulator is located in the /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications folder. Most of the time, you don't need to launch the iOS Simulator directly — running (or debugging) your application in Xcode automatically brings up the iOS Simulator. Xcode installs the application on the iOS Simulator automatically.

The iOS Simulator can simulate different versions of the iOS (see Figure 1-6. To support older versions of the SDK, you need to install the previous versions of the SDKs). This capability is useful if you need to support older versions of the platform, as well as test and debug errors reported in the application on specific versions of the OS.

In addition, the iOS Simulator can simulate different devices — iPad (see Figure 1-7), iPhone (3G and 3GS), and iPhone 4 with Retina display (see Figure 1-8).

Features of the iOS Simulator

The iOS Simulator simulates various features of a real iPhone, iPod touch, or iPad device. Features you can test on the iOS Simulator include the following:

* Screen rotation — left, right, top, and upside down

* Support for gestures:

* Tap

* Touch and Hold

* Double-tap

* Swipe

* Rotate

* Drag

* Pinch

* Low-memory warning simulations

However, the iOS Simulator, being a software simulator for the real device, does have its limitations. The following features are not available on the iOS Simulator:

* Making phone calls

* Accessing the accelerometer

* Sending and receiving SMS messages

* Installing applications from the App Store

* Camera

* Microphone

* Several features of OpenGL ES

NOTE In the latest release of the SDK (5.0), the iOS Simulator enables you to simulate different locations as well as movements. Chapter 20 discusses this in more detail.

Note also that the speed of the iOS Simulator is more tightly coupled to the performance of your Mac than the actual device. Therefore, it is important that you test your application on a real device, rather than rely exclusively on the iOS Simulator for testing.

Despite the iOS Simulator's limitations, it is definitely a useful tool for testing your applications. That said, testing your application on a real device is imperative before you deploy it on the App Store.

Uninstalling Applications from the iOS Simulator

The user domain of the iOS file system for the iOS Simulator is stored in the ~/Library/ Application Support/iPhone Simulator/ folder.

NOTE The ~/Library/Application Support/iPhone Simulator/ folder is also known as <iPhoneUserDomain>.

All third-party applications are stored in the <iPhoneUserDomain>/<version_no>/Applications/ folder. When an application is deployed onto the iOS Simulator, an icon is created on the Home screen and a file and a few folders are created within the Applications folder (see Figure 1-9).

To uninstall (delete) an application, execute the following steps:

1. Click and hold the icon of the application on the Home screen until all the icons start wriggling. Note that all the icons now have an X button displayed on their top-left corner.

2. Click the X button next to the icon of the application you want to uninstall (see Figure 1-10).

3. An alert window appears asking if you are sure you want to delete the icon. Click Delete to confirm the deletion.

WARNING When an application is uninstalled, the corresponding file and folder in the Applications folder are deleted automatically.

The easiest way to reset the iOS Simulator to its original state is to select iOS Simulator Reset Content and Settings....

Interface Builder

Interface Builder is a visual tool that enables you to design the user interfaces for your iPhone/iPad applications. Using Interface Builder, you drag and drop views onto windows and then connect the various views with outlets and actions so that they can programmatically interact with your code.

NOTE Outlets and actions are discussed in more detail in Chapter 3, and Appendix B discusses Interface Builder in more detail.

Instruments

The Instruments application (see Figure 1-12) enables you to dynamically trace and profile the performance of your Mac OS X, iPhone, and iPad applications.

Using Instruments, you can do all of the following:

* Stress test your applications.

* Monitor your applications for memory leaks.

* Gain a deep understanding of the executing behavior of your applications.

* Track difficult-to-reproduce problems in your applications.

NOTE Covering the Instruments application is beyond the scope of this book. For more information, refer to Apple's documentation, at http://developer .apple.com/mac/library/documentation/DeveloperTools/Conceptual/ InstrumentsUserGuide/Introduction/Introduction.html.

ARCHITECTURE OF THE IOS

Although this book doesn't explore the innards of iOS, understanding some of its important characteristics is useful. Figure 1-13 shows the different abstraction layers that make up the Mac OS X and iOS (which is used by the iPhone, iPod touch, and iPad).

NOTE The iOS is architecturally very similar to the Mac OS X except that the topmost layer is Cocoa Touch for the iPhone, rather than the Cocoa Framework.

The bottom layer is the Core OS, which is the foundation of the operating system. It is in charge of memory management, the file system, networking, and other OS tasks, and it interacts directly with the hardware. The Core OS layer consists of components such as the following:

* OS X Kernel

* Mach 3.0

* BSD

* Sockets

* Security

* Power Management

* Keychain

* Certificates

* File System

* Bonjour

The Core Services layer provides an abstraction over the services provided in the Core OS layer. It provides fundamental access to iOS services and consists of the following components:

* Collections

* Address Book

* Networking

* File Access

* SQLite

* Core Location

* Net Services

* Threading

* Preferences

* URL Utilities

The Media layer provides multimedia services that you can use in your iPhone and iPad applications. It consists of the following components:

* Core Audio

* OpenGL

* Audio Mixing

* Audio Recording

* Video Playback

* JPG, PNG, TIFF

* PDF

* Quartz

* Core Animation

* OpenGL ES

The Cocoa Touch layer provides an abstraction layer to expose the various libraries for programming the iPhone and iPad, such as the following:

* Multi-Touch events

* Multi-Touch controls

* Accelerometer

* View Hierarchy

* Localization

* Alerts

* Web Views

* People Picker

* Image Picker

* Controllers

In iOS programming, all the functionalities in each layer are exposed through various frameworks that you will use in your project. Subsequent chapters in this book demonstrate how to use these frameworks in your projects.

NOTE A framework is a software library that provides specific functionalities. Refer to Apple's documentation at http://developer.apple.com/ iphone/library/documentation/Miscellaneous/Conceptual/ iPhoneOSTechOverview/iPhoneOSFrameworks/iPhoneOSFrameworks.html for a list of frameworks included in the SDK.

SOME USEFUL INFORMATION BEFORE YOU GET STARTED

You now have a good idea of the tools involved in iPhone and iPad application development. Before you go ahead and take the plunge, the following sections discuss some useful information that can make your journey more pleasant.

Versions of iOS

At the time of writing, iOS is in its fifth revision — that is, version 5.0. Its major versions are as follows:

* 1.0 — Initial release of the iPhone

* 1.1 — Additional features and bug fixes for 1.0

* 2.0 — Released with iPhone 3G; comes with App Store

* 2.1 — Additional features and bug fixes for 2.0

* 2.2 — Additional features and bug fixes for 2.1

* 3.0 — Third major release of the iPhone OS

* 3.1 — Additional features and bug fixes for 3.0

* 3.2 — This version release is for the iPad only.

* 4.0 — Fourth major release of the iPhone OS. Renamed as iOS. This version is designed for the new iPhone 4 and it also supports older devices, such as the iPod touch and iPhones.

* 5.0 — Fifth major release of the iOS. Supports new features like iCloud, iMessage, Twitter integration, Notification Center, etc.

For a detailed description of the features in each release, see http://en.wikipedia.org/wiki/ IPhone_OS_version_history.

Testing on Real Devices

One of the most common complaints about developing applications for the iPhone and iPad is how difficult Apple makes it to test a new application on an actual device. Nonetheless, for security reasons, Apple requires all applications to be signed with a valid certificate; and for testing purposes, a developer certificate is required.

To test your applications on a device, you must sign up for the iOS Developer Program and request that a developer certificate be installed onto your device. Appendix A outlines these steps in detail.

Screen Resolutions

The iPhone 4S is a beautiful device with a high-resolution screen. At 3.5 inches (diagonally), the iPhone screen supports multi-touch operation and allows a pixel resolution of 960 x 640 at 326 ppi (see Figure 1-14). When designing your application, note that because of the status bar, the actual resolution is generally limited to 920 x 640 pixels. Of course, you can turn off the status bar programmatically to gain access to the full 960 x 640 resolution.

Also, be mindful that users may rotate the device to display your application in landscape mode. You need to make provisions to your user interface so that applications can still work properly in landscape mode.

NOTE Chapter 7 discusses how to handle screen rotations.

The older iPhones (iPhone 3G/3GS) and the iPod touch have lower resolutions compared to the iPhone 4/4S. They have a resolution of 480 320 pixels, one quarter of the resolution of the iPhone 4.

When programming for the iPhones, it is important to note the difference between points and pixels. For example, the following statement specifies a frame that starts from the point (20,10) with a width of 280 points and a height of 50 points:

CGRect frame = CGRectMake(20, 10, 280, 50);

On the older iPhones, a point corresponds to a pixel. Thus, the preceding statement translates directly to the pixel (20,10), with a width of 280 pixels and a height of 50 pixels. However, if the statement is executed within the iPhone 4/4S, a point translates to two pixels. Thus, the preceding statement translates into the pixel (40,20), with a width of 560 pixels and a height of 100 pixels. The translation is performed automatically by the OS, which is very useful because it enables older applications to run and scale correctly without modifications on the iPhone 4/4S.

The iPad has a pixel resolution of 1,024 768 at 132 ppi.

Table 1-1 summarizes the screen resolutions for the various platforms.

SUMMARY

This chapter offered a quick tour of the available tools used for iPhone and iPad application development. You had a look at the iOS Simulator, which you will use to test your applications without using a real device. The Simulator is a very powerful tool that you will use very often in your iPhone development journey.

You also learned some of the characteristics of the iPhone and iPad, such as screen resolutions, as well as characteristics of the operating systems. In the next chapter, you will develop your first iOS application, and soon be on your way to iOS nirvana!

(Continues...)



Excerpted from Beginning iOS 5 Application Development by Wei-Meng Lee Copyright © 2012 by John Wiley & Sons, Ltd. Excerpted by permission of John Wiley & Sons. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Read More Show Less

Table of Contents

INTRODUCTION xxi

CHAPTER 1 Getting Started with iOS 5 Programming 1

CHAPTER 2 Writing Your First Hello World! Application 17

CHAPTER 3 Understanding Views, Outlets, and Actions 35

CHAPTER 4 Exploring the Different View Controllers 67

CHAPTER 5 Enabling Multi-Platform Support for the iPhone and iPad 109

CHAPTER 6 Handling Keyboard Inputs 123

CHAPTER 7 Supporting Screen Rotations 149

CHAPTER 8 Displaying and Persisting Data Using the Table View 163

CHAPTER 9 Using Application Preferences 201

CHAPTER 10 File Handling 221

CHAPTER 11 Database Storage Using SQLite 253

CHAPTER 12 Programming iCloud 269

CHAPTER 13 Performing Simple Animations and Video Playback 295

CHAPTER 14 Accessing Built-In Applications 317

CHAPTER 15 Accessing the Sensors 339

CHAPTER 16 Using Web Services 359

CHAPTER 17 Bluetooth Programming 393

CHAPTER 18 Bonjour Programming 415

CHAPTER 19 Programming Remote Notifi cations Using Apple Push Notifi cation Services 427

CHAPTER 20 Displaying Maps 449

CHAPTER 21 Programming Background Applications 487

APPENDIX A Testing on an Actual Device 511

APPENDIX B Getting Around in Xcode 533

APPENDIX C Crash Course in Objective-C 559

APPENDIX D Answers to Exercises 587

INDEX 601

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)