| Preface | | ix | |
| | 1 | |
| | 1 | |
| Why Write Native Applications? |
| | 2 | |
| | 3 | |
| Build It and They Will Come |
| | 4 | |
| | 7 | |
| Registering as an iOS Developer |
| | 7 | |
| Enrolling in the iOS Developer Program |
| | 9 | |
| The Mac Developer Program |
| | 10 | |
| | 11 | |
| What Happens When There Is a Beta? |
| | 13 | |
| Preparing Your iOS Device |
| | 14 | |
| Creating a Development Certificate |
| | 15 | |
| Getting the UDID of Your Development Device |
| | 17 | |
| | 18 | |
| Creating a Mobile Provisioning Profile |
| | 19 | |
| Making Your Device Available for Development |
| | 20 | |
| | 23 | |
| | 23 | |
| Object-Oriented Programming |
| | 23 | |
| The Objective-C Object Model |
| | 25 | |
| The Basics of Objective-C Syntax |
| | 27 | |
| | 28 | |
| Exploring the Project in Xcode |
| | 32 | |
| Our Project in Interface Builder |
| | 39 | |
| Building the User Interface |
| | 41 | |
| Connecting the User Interface to the Code |
| | 42 | |
| Running the Application in the Simulator |
| | 46 | |
| Putting the Application on Your iPhone |
| | 48 | |
| | 49 | |
| Declaring and Defining Classes |
| | 49 | |
| Declaring a Class with the Interface |
| | 49 | |
| Defining a Class with the Implementation |
| | 51 | |
| | 52 | |
| | 52 | |
| | 54 | |
| | 54 | |
| | 54 | |
| | 55 | |
| | 56 | |
| | 56 | |
| | 57 | |
| | 57 | |
| The alloc, retain, copy, and release Cycle |
| | 58 | |
| Automatic Reference Counting |
| | 59 | |
| | 60 | |
| Responding to Memory Warnings |
| | 60 | |
| Fundamental iOS Design Patterns |
| | 60 | |
| The Model-View-Controller Pattern |
| | 61 | |
| Views and View Controllers |
| | 61 | |
| The Delegates and DataSource Pattern |
| | 62 | |
| | 63 | |
| 5 Table View---Based Applications |
| | 65 | |
| | 65 | |
| | 66 | |
| | 71 | |
| Populating the Table View |
| | 71 | |
| | 73 | |
| Adding Cities to the Guide |
| | 78 | |
| Adding Images to Your Projects |
| | 80 | |
| Connecting the Controller to the Model |
| | 81 | |
| Mocking Up Functionality with Alert Windows |
| | 84 | |
| Adding Navigation Controls to the Application |
| | 85 | |
| | 87 | |
| | 94 | |
| | 98 | |
| | 99 | |
| The "Add New City" Interface |
| | 102 | |
| | 109 | |
| | 115 | |
| | 115 | |
| Making the Battery Monitoring Application |
| | 116 | |
| | 127 | |
| Adding Another Tab Bar Item |
| | 128 | |
| Combining View Controllers |
| | 132 | |
| | 137 | |
| Modifying the City Guide Application |
| | 139 | |
| The Image Picker View Controller |
| | 148 | |
| Adding the Image Picker to the City Guide Application |
| | 148 | |
| Master-Detail Applications |
| | 157 | |
| Creating a Universal Application |
| | 158 | |
| | 167 | |
| 7 Connecting to the Network |
| | 169 | |
| | 169 | |
| Apple's Reachability Class |
| | 169 | |
| Embedding a Web Browser in Your App |
| | 181 | |
| A Simple Web View Controller |
| | 182 | |
| Displaying Static HTML Files |
| | 191 | |
| Getting Data Out of a UIWebView |
| | 192 | |
| | 192 | |
| Getting Data from the Internet |
| | 198 | |
| | 198 | |
| | 198 | |
| | 199 | |
| | 219 | |
| | 219 | |
| UITextField and Its Delegate |
| | 219 | |
| UITextView and Its Delegate |
| | 221 | |
| | 223 | |
| | 224 | |
| Parsing XML with NSXMLParser |
| | 225 | |
| | 227 | |
| | 227 | |
| | 229 | |
| Retrieving Twitter Trends |
| | 230 | |
| Using the Twitter Framework |
| | 232 | |
| The Twitter Trends Application |
| | 232 | |
| | 240 | |
| Introduction to Regular Expressions |
| | 240 | |
| | 245 | |
| | 245 | |
| Storing Information in a SQL Database |
| | 246 | |
| | 254 | |
| | 255 | |
| | 255 | |
| | 256 | |
| | 256 | |
| | 256 | |
| | 257 | |
| Magnetometer Availability |
| | 257 | |
| Setting Required Hardware Capabilities |
| | 258 | |
| | 258 | |
| | 259 | |
| Differences Between iPhone and iPad |
| | 260 | |
| | 261 | |
| The Core Motion Framework |
| | 262 | |
| | 262 | |
| | 263 | |
| | 264 | |
| | 268 | |
| | 270 | |
| Accessing the Proximity Sensor |
| | 275 | |
| | 277 | |
| 10 Geolocation and Mapping |
| | 279 | |
| The Core Location Framework |
| | 279 | |
| | 281 | |
| Location-Dependent Weather |
| | 283 | |
| | 284 | |
| | 284 | |
| | 285 | |
| Modifying the Weather Application |
| | 285 | |
| | 293 | |
| | 301 | |
| 11 Introduction to iCloud |
| | 309 | |
| | 309 | |
| | 310 | |
| Provisioning Your Application for iCloud |
| | 310 | |
| | 313 | |
| | 320 | |
| 12 Integrating Your Application |
| | 323 | |
| | 323 | |
| | 333 | |
| | 335 | |
| | 336 | |
| | 337 | |
| | 337 | |
| Registering Custom Schemes |
| | 339 | |
| | 344 | |
| | 349 | |
| Interactive People Picking |
| | 349 | |
| Programmatic People Picking |
| | 353 | |
| | 353 | |
| 13 Distributing Your Application |
| | 355 | |
| | 355 | |
| | 355 | |
| | 359 | |
| Changing the Display Name |
| | 364 | |
| | 365 | |
| | 366 | |
| | 367 | |
| Developer-to-Developer Distribution |
| | 372 | |
| | 373 | |
| Submitting to the App Store |
| | 374 | |
| Building Your Application for App Store Distribution |
| | 380 | |
| The App Store Resource Center |
| | 383 | |
| | 384 | |
| | 389 | |
| | 389 | |
| | 389 | |
| | 390 | |
| | 390 | |
| | 391 | |
| | 391 | |
| | 392 | |
| | 392 | |
| | 392 | |
| | 393 | |
| | 393 | |
| | 394 | |
| Index | | 395 | |