Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Learning iPhone Programming
Preface
Who Should Read This Book?
What Should You Already Know?
What Will You Learn?
What’s in This Book?
Conventions Used in This Book
Using Code Examples
How to Contact Us
Safari® Books Online
Acknowledgments
1. Why Go Native?
The Pros and Cons
Why Write Native Applications?
The Release Cycle
Build It and They Will Come
2. Becoming a Developer
Registering As an iPhone Developer
Enrolling in the iPhone Developer Program
The Apple Developer Connection
Installing the iPhone SDK
Preparing Your iPhone or iPod touch
Creating a Development Certificate
Getting the UDID of Your Development Device
Creating an App ID
Creating a Mobile Provisioning Profile
Making Your Device Available for Development
3. Your First iPhone App
Objective-C Basics
Object-Oriented Programming
The Objective-C Object Model
The Basics of Objective-C Syntax
Creating a Project
Exploring the Project in Xcode
Overview of an iPhone application
The application delegate
The view controller
Our Project in Interface Builder
Adding Code
Connecting the Outlets in Interface Builder
Putting the Application on Your iPhone
4. Coding in Objective-C
Declaring and Defining Classes
Declaring a Class with the Interface
Defining a Class with the Implementation
Object Typing
Properties
Synthesizing Properties
The Dot Syntax
Declaring Methods
Calling Methods
Calling Methods on nil
Memory Management
Creating Objects
The Autorelease Pool
The alloc, retain, copy, and release Cycle
The dealloc Method
Responding to Memory Warnings
Fundamental iPhone Design Patterns
The Model-View-Controller Pattern
Views and View Controllers
The Delegates and DataSource Pattern
Conclusion
5. Table-View-Based Applications
Simplifying the Template Classes
Creating a Table View
Organizing and Navigating Your Source Code
Connecting the Outlets
Building a Model
Adding Images to Your Projects
Connecting the Controller to the Model
Mocking Up Functionality with Alert Windows
Adding Navigation Controls to the Application
Adding a City View
Edit Mode
Deleting a City Entry
Adding a City Entry
The “Add New City...” Interface
Capturing the City Data
6. Other View Controllers
Utility Applications
Making the Battery Monitoring Application
Building our interface
Writing the code
Wiring the application in Interface Builder
Tab Bar Applications
Refactoring the Template
Creating the first tab
Creating the second tab
Wrapping up the refactoring
Adding Another Tab Bar Item
Finishing Up
Modal View Controllers
Modifying the City Guide Application
The Image Picker View Controller
Adding the Image Picker to the City Guide Application
7. Connecting to the Network
Detecting Network Status
Apple’s Reachability Class
Synchronous reachability
Asynchronous reachability
Using Reachability directly
Embedding a Web Browser in Your App
A Simple Web View Controller
Displaying Static HTML Files
Getting Data Out of a UIWebView
Sending Email
Getting Data from the Internet
Synchronous Requests
Asynchronous Requests
Using Web Services
The Google Weather Service
Building an application
Parsing the XML document
Populating the UI
Tidying up
8. Handling Data
Data Entry
UITextField and Its Delegate
UITextView and Its Delegate
Dismissing the UITextView
Parsing XML
Parsing XML with libxml2
Parsing XML with NSXMLParser
Parsing JSON
The Twitter Search Service
The Twitter Trends Application
Refactoring
Retrieving the trends
Building a UI
Parsing the JSON document
Tidying up
Regular Expressions
Introduction to Regular Expressions
RegexKitLite
Faking regex support with the built-in NSPredicate
Storing Data
Using Flat Files
Reading and writing text content
Creating temporary files
Other file manipulation
Storing Information in an SQL Database
Adding a database to your project
Data persistence for the City Guide application
Refactoring and rethinking
Core Data
9. Distributing Your Application
Adding Missing Features
Adding an Icon
Adding a Launch Image
Changing the Display Name
Enabling Rotation
Building and Signing
Ad Hoc Distribution
Obtaining a distribution certificate
Registering devices
Creating a provisioning profile
Building your application for ad hoc distribution
Distributing an ad hoc build
Developer-to-Developer Distribution
App Store Distribution
Building your application for App Store distribution
Submitting to the App Store
The App Store Resource Center
Reasons for Rejection
10. Using Sensors
Hardware Support
Determining Available Hardware Support
Network availability
Camera availability
Audio input availability
GPS availability
Setting Required Hardware Capabilities
Using the Camera
The Core Location Framework
Location-Dependent Weather
Using the GeoNames reverse geocoding service
Modifying the Weather application
Tidying up
Using the Accelerometer
Writing an Accelerometer Application
Using the Digital Compass
Accessing the Proximity Sensor
Using Vibration
11. Geolocation and Mapping
User Location
Annotating Maps
12. Integrating Your Application
Application Preferences
Accessing Global Preferences
Custom URL Schemes
Using Custom Schemes
Making a telephone call
Sending an SMS message
Registering Custom Schemes
Media Playback
Using the Address Book
Interactive People Picking
Programmatic People Picking
13. Other Native Platforms
PhoneGap
Download and Installation
Building a PhoneGap Project
MonoTouch
Download and Installation
Building a MonoTouch Project
14. Going Further
Cocoa and Objective-C
The iPhone SDK
Web Applications
Core Data
Push Notifications
In-App Purchase
Core Animation
Game Kit
Writing Games
Look and Feel
Hardware Accessories
Index
Colophon
← Prev
Back
Next →
← Prev
Back
Next →