Introduction

Response to the iPhone, the iPod touch, and now the iPad has been nothing short of overwhelming. The App Store has captured the hobbyist’s imagination like no other platform in recent memory. Hobbyists have made—and will continue to make—money from their creations sold on the App Store. And we aren’t necessarily talking about high-minded technical innovations. The media has reported that apps that make your iPhone pass gas have made folks hundreds of thousands of dollars. Rival farting App developers have even gone so far as to sue one another over the App Store’s precious revenue. The iOS family of devices and the App Store are here to stay—and there’s still plenty of opportunity for you to create the next great app.

As proof of this popularity, after posting a few tutorial videos on Vimeo, James heard from people from Asia, Europe, and South America about those videos. So, when we decided to write this book, we kept in mind that iOS devices have significant international appeal. We have tried to make this book as accommodating as possible for as wide an audience as possible. We have kept colloquialisms to a minimum, for instance. But more important than avoiding colloquialisms, this book relies upon discrete, numbered steps that illustrate each major concept. Rather than a lot of prose describing the iOS SDK, we show you the SDK in action.

The Book’s Focus

This book has three goals. The first of these is to get you comfortable with using the iOS’s user interface controls in Interface Builder. Interface Builder is a useful tool that removes much of the complexity of creating and laying out the user interface for iOS apps. Once you master this tool, building a graphical user interface (GUI) using Interface Builder is quicker and more intuitive than using code.

The second goal of this book is to brush up your C language programming skills and introduce you to Objective-C. Most likely you haven’t used C since college, and chances are good you have never used Objective-C. However, because Objective-C is the language used for Cocoa and Cocoa Touch programming, you must understand Objective-C if you wish to create iPhone and iPad apps. After refreshing your memory on C, this book moves on to Objective-C with a two-chapter tutorial that will give you a foundation for getting started with the iOS SDK.

The third goal of this book is to cover all of the most useful functionality of the iOS SDK so that you’re ready to create your own iOS apps for the App Store. We cover using the latest version of Apple’s development environment, XCode 4, and most of the features introduced in the latest versions of the SDK for the iPad and the iPhone 4.

NOTE
This book’s code examples can be downloaded at:
www.mhprofessional.com/computingdownloads.

The Book’s Content

This book assumes no prior C or Objective-C knowledge. Although not comprehensive, chapters on C and Objective-C should provide enough detail to understand the book’s remaining chapters. The book starts with the prerequisites. Both C and Objective-C are prerequisites to programming iOS applications. You don’t need to be a C expert to use Objective-C, but you should remember C’s basics. After providing a C refresher, the book has two chapters on Objective-C. These chapters introduce a lot of concepts quickly, but Objective-C is the language used for Cocoa Touch, so you’d be advised to learn it. After covering Objective-C, the book provides a chapter on installing an iOS application on an iPhone, iPod touch, or iPad device. It also provides a tutorial on debugging and testing your application.

Chapter 6 finally begins the book’s UIKit coverage. Chapters 6 through 10 discuss the UIView subclasses you use when laying out an iOS application. Chapter 11 discusses alerts, action sheets, and application badges. Chapters 12 and 13 discuss the many controls available for an iOS user interface. Chapter 13 also discusses how to use the photo library and the camera built into the iPhone.

After describing the UIKit, the book then moves on to discuss several other essential iOS application programming topics. Chapter 14 discusses setting your application’s preferences using the Settings application. Chapter 15 discusses file I/O, property lists, and archiving objects. Chapter 16 discusses using the iOS’s built-in database, SQLite. Chapter 17 builds a more complex iOS application and discusses Core Data, by far the easiest persistence framework you can use while programming with iOS. Chapter 18 discusses using iTunes music in your application.

Finally, Chapter 19 discusses the new SDK functionality available for the iPad and shows you how to create a universal application that will run on the iPhone or iPod touch but also take full advantage of the larger display on the iPad when available. All of the framework functionality described in the earlier chapters applies to the iPad and the new iPhone 4, so this chapter focuses on how to layer new iOS 4 functionality on top of the skills that you’ve already learned.

This book doesn’t require any prior knowledge of C, Objective-C, or Cocoa Touch and the iOS frameworks, so provided you have some prior programming experience and you work through all of the exercises in the book, you should be ready to start working on your own iPhone applications when you’ve finished the book. However, even if you eventually decide to hire an independent developer to help build your application (via a web site like www.iphoneappquotes.com), everything you’ve learned working through the exercises will be invaluable when it comes time to turn your ideas into a design and work with others to implement them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset