Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword or section
Like this

Table Of Contents

At a Glance
Translate Your Initial Idea into an Implementation Plan
UIKit Provides the Core of Your App
Apps Must Behave Differently in the Foreground and Background
iCloud Affects the Design of Your Data Model and UI Layers
Apps Require Some Specific Resources
Many App Behaviors Can Be Customized
Apps Must Be Tuned for Performance
The iOS Environment Affects Many App Behaviors
How to Use This Document
See Also
Doing Your Initial Design
Learning the Fundamental iOS Design Patterns and Techniques
App Design Basics
Translating Your Initial Design into an Action Plan
Starting the App Creation Process
The Core Objects of Your App
Core App Objects
Table2-1 The role of objects in an iOS app
The Data Model
Defining a Custom Data Model
Table2-2 Data classes in the Foundation framework
Listing2-1 Definition of a custom data object
Defining a Structured Data Model Using Core Data
Defining a Document-Based Data Model
Figure2-2 Using documents to manage the content of files
The User Interface
Building an Interface Using UIKit Views
Figure2-3 Building your interface using view objects
Building an Interface Using Views and OpenGL ES
Figure2-4 Building your interface using OpenGL ES
The App Bundle
Figure3-1 State changes in an iOS app
The App Launch Cycle
Figure3-2 Launching an app into the foreground
Figure3-3 Launching an app into the background
Listing3-1 Themain function of an iOS app
Responding to Interruptions
Figure3-4 Handling alert-based interruptions
What to Do When an Interruption Occurs
Memory Usage for Background Apps
Returning to the Foreground
Figure3-6 Transitioning from the background to the foreground
Processing Queued Notifications at Wakeup Time
Table3-2 Notifications delivered to waking apps
App Termination
The Main Run Loop
Figure3-7 Processing events in the main run loop
Table3-3 Common types of events for iOS apps
Background Execution and Multitasking
Determining Whether Multitasking Is Available
Listing3-2 Checking for background support in earlier versions of iOS
Executing a Finite-Length Task in the Background
Listing3-3 Starting a background task at quit time
Scheduling the Delivery of Local Notifications
Listing3-4 Scheduling an alarm notification
Implementing Long-Running Background Tasks
Being a Responsible Background App
Opting out of Background Execution
Concurrency and Secondary Threads
Design Considerations for iCloud Apps
iCloud Storage
Table4-1 Differences between document and key-value storage
Configuring Your App’s iCloud Entitlements
Using iCloud Document Storage
Figure4-1 Pushing document changes to iCloud
Determining if iCloud Document Storage is Available
Incorporating File Presenters into Your Workflow
Manipulating Files and Directories in iCloud
Choosing a Strategy to Respond to Version Conflicts
Incorporating Search into Your Infrastructure
Determining the Transfer Status of a File or Directory
Working With Files That Are Not Yet Downloaded
Updating Your User Interface for iCloud
Using iCloud in Conjunction with Databases
Using iCloud Key-Value Data Storage
Being a Responsible iCloud App
App Store Required Resources
The Information Property List File
App-Related Resources
Declaring the Required Device Capabilities
Table5-1 Dictionary keys for theUIRequiredDeviceCapabilities key
Declaring Your App’s Supported Document Types
App Icons
Table5-2 Sizes for images in theCFBundleIconFiles key
App Launch (Default) Images
Table5-3 Typical launch image dimensions
Providing Launch Images for Different Orientations
Table5-4 Launch image orientation modifiers
Providing Device-Specific Launch Images
Providing Launch Images for Custom URL Schemes
The Settings Bundle
Figure5-1 Custom preferences displayed by the Settings app
Localized Resource Files
Creating a Universal App
Updating Your Info.plist Settings
Advanced App Tricks
Implementing Your View Controllers and Views
Adding Runtime Checks for Newer Symbols
Using Runtime Checks to Create Conditional Code Paths
Updating Your Resource Files
Preserving the State of Your App’s User Interface
Launching in Landscape Mode
Installing App-Specific Data Files at First Launch
Protecting Data Using On-Disk Encryption
Tips for Developing a VoIP App
Configuring Sockets for VoIP Usage
Table6-1 Configuring stream interfaces for VoIP usage
Installing a Keep-Alive Handler
Configuring Your App’s Audio Session
Using the Reachability Interfaces to Improve the User Experience
Communicating with Other Apps
Implementing Custom URL Schemes
Registering Custom URL Schemes
Table6-2 Keys and values of theCFBundleURLTypes property
Figure6-1 Defining a custom URL scheme in theInfo.plist file
Handling URL Requests
Figure6-3 Waking a background app to open a URL
Listing6-1 Handling a URL request based on a custom scheme
Showing and Hiding the Keyboard
Turning Off Screen Locking
Make App Backups More Efficient
What Is Backed Up?
Performance Tuning
Files Saved During App Updates
Use Memory Efficiently
Observe Low-Memory Warnings
Reduce Your App’s Memory Footprint
Table7-1 Tips for reducing your app’s memory footprint
Allocate Memory Wisely
Table7-2 Tips for allocating memory
Move Work off the Main Thread
Floating-Point Math Considerations
Reduce Power Consumption
Tune Your Code
Improve File Access Times
Tune Your Networking Code
Tips for Efficient Networking
Using Wi-Fi
The Airplane Mode Alert
Specialized System Behaviors
The Virtual Memory System
The Automatic Sleep Timer
The iOS Environment
Multitasking Support
The App Sandbox
Keychain Data
Document Revision History
0 of .
Results for:
No results containing your search query
P. 1
iPhone App Programming Guide

iPhone App Programming Guide

|Views: 1,231|Likes:
Published by William Chang

More info:

Published by: William Chang on Oct 29, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





You're Reading a Free Preview
Pages 7 to 33 are not shown in this preview.
You're Reading a Free Preview
Pages 37 to 42 are not shown in this preview.
You're Reading a Free Preview
Pages 46 to 120 are not shown in this preview.

Activity (3)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Ankit Thakur liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->