This practical book offers the knowledge and code you need to create cutting-edge mobile applications and games for the iPhone and iPod Touch, using Apple's iPhone SDK. iPhone SDK Application Development introduces you to this development paradigm and the Objective-C language it uses with numerous examples, and also walks you through the many SDK frameworks necessary for designing full-featured applications.
This book will help you:
Design user interface elements with Interface Builder and the UI Kit framework
Create application controls, such as windows and navigation bars
Build and manage layers and transformations using Core Graphics and Quartz Core
Mix and play sound files using AVFoundation, and record and play back digital sound streams using Audio Toolbox
Handle network programming with the CFNetwork framework
Use the Core Location framework to interact with the iPhone's GPS
Add movie players to your application
iPhone SDK Application Development will benefit experienced developers and those just starting out on the iPhone. Important development concepts are explained thoroughly, and enough advanced examples are provided to make this book a great reference once you become an expert.
Chapter 1 Getting Started with the iPhone SDK
Anatomy of an Application
Installing the iPhone SDK
Provisioning an iPhone
Building and Installing Applications
Transitioning to Objective-C
Chapter 2 Interface Builder: Xcode’s GUI for GUIs
Windows, Views, and View Controllers
Existing Templates
New Templates
User Interface Elements
The Inspector
Designing a UI
Removing Interface Builder from a Project
Chapter 3 Introduction to UI Kit
Basic User Interface Elements
Windows and Views
View Controllers
Text Views
Navigation Bars and Controllers
Transition Animations
Action Sheets and Alerts
Table Views and Controllers
Status Bar Manipulation
Application Badges
Application Services
Invoking Safari
Initiating Phone Calls
Chapter 4 Multi-Touch Events and Geometry
Introduction to Geometric Structures
Multi-Touch Events Handling
Chapter 5 Layer Programming with Quartz Core
Understanding Layers
Chapter 6 Making a Racket: Audio Toolbox and AVFoundation
Jonathan Zdziarski is better known as the hacker "NerveGas" in the iPhone development community. He worked on the initial cracking of the iPhone and helped lead the effort to port the first open source applications. His initial book on the iPhone, iPhone Open Application Development, developed an immediate cult following and taught developers how to write applications for the popular device before the SDK was ever conceived.
Prior to the release of iPhone Forensics, Jonathan wrote and supported an iPhone forensics manual distributed exclusively to law enforcement, and has assisted many forensic examiners in their investigations. Jonathan frequently consults to law enforcement agencies and teaches an iPhone forensics workshop in his spare time to train forensic examiners and corporate security personnel.
Jonathan is also a full-time research scientist specializing in machine learning technology to combat online fraud and spam, and to develop networking products capable of learning how to better protect customers. He is founder of the DSPAM project, a high-profile, next-generation spam filter that was acquired in 2006 by Sensory Networks, Inc. He lectures widely on the topic of spam and is a foremost researcher in the fields of machine-learning and algorithmic theory.
The image on the cover of iPhone SDK Application Development is a red-billed streamertail hummingbird (Trochilus polytmus). The hummingbird, a native of Jamaica, isaffectionately nicknamed the "doctor bird" because its long tail feathers cross like the coattails that once were a part of doctors' uniforms.
The country of Jamaica houses more than 200 species of birds, but the popular redbilled streamertail, common throughout Jamaica and featured on the country's currency, is the national bird. Bird watchers from around the world often travel to Jamaica to view the red-billed streamertail and its cousin, the black-billed streamertail. Bird enthusiasts will find that the best time to spot streamertails is during the seasons of winter and spring, as that is when hummingbirds from Mississippi and the Atlantic flyway migrate to Jamaica.
Female hummingbirds build nests out of moss and plants and will bind their nests with threads from spiders' webs. After an incubation period of two to three weeks, the femalehummingbird will give birth to featherless babies, whom she will feed regurgitated insects until they can fly some distance on their own.
The small size of the red-billed streamertail and other hummingbirds renders them vulnerable to predators. In spite of this vulnerability, the agile hummingbird often taunts predators such as hawks in an effort to seize more territory when migrating. However, this bold behavior can backfire against other predators. Larger species of the praying mantis will entice the hummingbird by remaining motionless until the bird ventures close. Once the bird does so, the praying mantis will suddenly pierce the hummingbird's chest with one of its spiny forelegs and then consume the bird's flesh.
The cover image is from Dover's Animals. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSansMonoCondensed.
Comments about oreilly iPhone SDK Application Development:
There is confusion in terminology. The reader should exercise great ingenuity.
10/14/2010
(2 of 2 customers found this review helpful)
3.0
Not up to O'Reilly's usual standard
By molen
from London, England
About Me Developer
Pros
Accurate
Concise
Cons
Not pragmatic enough
Too political
Best Uses
Student
Comments about oreilly iPhone SDK Application Development:
The tagline is "Building applications for the AppStore". The book is much more about programming apps for fun and as an academic pursuit. That's not necessarily a bad thing, it just really wasn't what I wanted.
For instance, instead of using Interface Builder to build UI, this book advocates writing the code all by hand every time. That's interesting enough, but it doesn't really help me build an app to launch onto the AppStore.
4/30/2010
(2 of 2 customers found this review helpful)
2.0
Missing/erroneous code
By Ricky
from Connecticut, USA
Pros
Helpful examples
Cons
Difficult to understand
Too many errors
Best Uses
Intermediate
Comments about oreilly iPhone SDK Application Development:
I was initially pleased with the hands-on approach taken by the author, but I'm now at the end of ch. 5, and my disappointments are growing; The examples no longer work as described (things may get better in subsequent chapters, but I'm concerned):TableDemo (pp 103 ff) the alert box promised in What's going on, pt 5 does not show () when an entry is deleted. Instead, an alert box shows when an entry is selected.BounceDemo (pp 137 ff): Only one of the promised animations is generated by the code shown.The images we're supposed to be able to download from [@] are unavailable b/c that web location no longer exists.Now, I managed to debug the given code to make it behave like specified (BTW I have no prior experience with iPhone dev.) and use my own images, and one may consider this a valuable learning experience. But if this was the intention, it should be stated as such. As it stands, I consider it sloppiness on the part of the author.As an aside, he also seems to be extremely fond of dangling modifiers.
11/14/2009
(6 of 7 customers found this review helpful)
4.0
For real-programmers
By Chrilly
from Altmelon Austria/Europe
About Me Designer, Developer
Pros
Accurate
Concise
Helpful examples
Well-written
Cons
Best Uses
Expert
Intermediate
Comments about oreilly iPhone SDK Application Development:
I am an experienced programmer, who has done projectes in a dozen of different languages. But I'am new to the Apple-world. The first books a ordered where of the sort, start Interface-Builder, scroll down 1/4 screen, choose a label, drag it to canvas, write "Hello World" in the label and viola, Hello-World is ready. It was a total disappointing experience. I did not know afterwards, whats going on. I am a programmer and not a picture-clicker. This book is different. Its really about coding. I typed in all the programms and especially my fingers have now quite a good feeling of the Mac-keyboard, Objective-C and the iPhone-SDK. After carefully working through this book, one is still no iPhone-programming expert. But one has a solid base for further explorations into the Mac-World. The book is methodically similar to Charles Petzold's Programming Windows, but its much shorter and less detailed. My main criticism is the poor typesetting of the code. Sometimes there is even a line-break of variable or method names. One has to guess, if its 2 names or just one name, seperated by a line-break. An example of this is presented in the Errata. The code has also potential for improvement in programming style. E.g. in Chap.4 the array offsets is addressed several times with offsets[tracking[touchId]]. The code would be much more compact, if one places tracking[touchId] into a tempary variable trId and writes then offsets[trId].
9/26/2009
(2 of 3 customers found this review helpful)
4.0
Amazing Book
By Baskaran
from Singapore
About Me Developer
Pros
Accurate
Well-written
Cons
Best Uses
Intermediate
Comments about oreilly iPhone SDK Application Development:
At the first glance I thought it is just another iPhone SDK book - but when I went deeper in my learning process - this book taught me several techniques that other books even failed to talk about.
9/3/2009
(2 of 3 customers found this review helpful)
4.0
Good, but skip the Preface
By James King
from Undisclosed
Comments about oreilly iPhone SDK Application Development:
The author is politically opinionated and it really colours almost every introductory paragraph in this book. His own foreword expresses a complete dislike of the material which this book covers. I highly recommend skipping it.
His political opinions tend to taint every subsequent introductory paragraph. "Apple is great, but the SDK is like a pair of handcuffs." Yeah we get it, but people reading this book really won't care. Such drivel should have been edited out. Skip them if you can.
Otherwise, its a great introductory book. A measure of previous programming experience with GUIs and desktop environments is an asset. However, even exposure to general programming concepts will do. The Objective-C primer will be a breeze for anyone who knows C or C++ and should be pretty comprehensive for people coming from any other language. Beginners and intermediate programmers coming to the iPhone platform will likely find this book useful.
Just cut out the useless cruft!
6/5/2009
(3 of 5 customers found this review helpful)
1.0
Very Disappointed
By Jamesmwlv
from Undisclosed
Comments about oreilly iPhone SDK Application Development:
Basically the book is not for a iphone programming beginner. The author forgets to include all the steps to program his examples and put minute clues in some the paragrams and those are even wrong. I tossed it in the trash!
5/29/2009
(8 of 9 customers found this review helpful)
1.0
Early impressions not good
By Don
from Undisclosed
Comments about oreilly iPhone SDK Application Development:
I have only read the first few chapters so I can't judge the entire book, but there are such major problems with Chapter 2 on the Interface Builder (IB) that I am already very dissatisfied with the book. Note that I am a complete newcomer to the Interface Builder but I am the target audience for this chapter.
First let me say that the tutorial simply does not create the desired application, apparently because of some missing step. So that is major, but there are many things that are upsetting about this tutorial and how it is presented to the reader.
The fist thing is that the steps of the tutorial are buried in the text and hard to distinguish from the non-tutorial information. For example, the first two steps of the tutorial are to create a project with Xcode and to open the generated MainWindow.xib file in Interface Builder by double-clicking it from Xcode. Immediately following those steps there is what appears to be the next tutorial step, saying, "To create a new IB project from a template, select New from the File menu". Yet this is not really a step in the tutorial and following it hopelessly confuses the reader. If the tutorial steps were clearly differentiated from the expository text and were numbered and had a distinct font, this confusion would not have occurred.
The next gripe is that the tutorial has many pages of expository text inserted right in the middle of it, making it very hard to follow or to find a particular step. It would be much better if the tutorial was in one uninterrupted piece and followed the expository material.
There were places in the tutorial in which the instructions did not follow logically. For example, there is a step that tells the reader to launch the IB and edit the MainWindow template. But at this point the IB is still open from the previous step. At another point, the instructions say to save the template as MainWindow, but since you started IB by opening MainWindow, the instruction should simply say to save the template. It is a minor point but still causes confusion because it doesn't make sense.
There are also parts of the tutorial that could use more information, including screen grabs. For example, where it tells you to drag a Tab Bar Controller into the document window, it fails to mention that you need to open the Library first. Another minor point but it shows lack of appreciation for the inexperience of the reader for which it is intended.
Another point of confusion arose when the instructions say "We suggest that you create a separate view class to correspond to each tab and use an IB file to describe them." The impression I got was that I was supposed to create the view classes first and that I would then describe them with an IB file. It is clarified in the next paragraph but that came too late to prevent me from wasting time trying to figure out how I should create a view class and what it meant to describe it with IB once it was created.
There were other points of confusion that could have been avoided if the author had worked through the tutorial before publishing it, which I seriously doubt he did. For example you are instructed to save templates and the default location is in the application, which causes Xcode to ask if you want to add them to the app. But the instructions seem to assume that you saved them somewhere else and need to drag them into the application later. And the instructions do not tell you how to fill in the forms that appear when you do add the templates to the application.
But the really big problem is that it is impossible to create the desired application with the tutorial. The instructions at one point say that that the application delegate class will have properties for window and viewController, but there is only window, none for viewController. And from this point on the instructions are impossible to follow because they depend on the viewController property. It seems apparent that neither the author nor the editor ever went through the tutorial.
Maybe things get better as the book progresses.
5/11/2009
(1 of 2 customers found this review helpful)
4.0
Nice beginners tutorial
By Reggie Burnett
from Undisclosed
Comments about oreilly iPhone SDK Application Development:
While this book is not as comprehensive as some have wanted, I found it to be a nice beginners tutorial to writing iPhone applications. The book starts out with an objective-C primer. Since objective-C has such an "interesting" syntax this is badly needed, even though I come from a strong programming background.
Each section includes a reasonably complex sample that puts that section's material to use. Most of the sections also include a "Further Study" area that gives you some homework. This is where the user can expand his knowledge through research and working with the tools.
The book jumps around a bit by first going over simple UI patterns, then spending time talking about audio services and networking, only to come back and spend more time with UI controls, only to jump back into audio/video. Still, one has to remember that this is a reference book and not a novel so jumping around is ok.
The sample applications that I have tried so far are ok and I feel like I have a much better grasp on how the iPhone system works.
This book is not an XCode or Interface Builder tutorial.
3/5/2009
(6 of 7 customers found this review helpful)
4.0
Chapter 7 partially completed
By Gordon Vidaver
from Undisclosed
Comments about oreilly iPhone SDK Application Development:
Not sure where else to provide feedback for this book. If there's a better place please tell me.
Seems like a good book but this complaint is about Chapter 7 : Networking.
Issues :
1) Example code is missing.
2) Client side of "7.1.5. CFSocket Example: Joke Server" is missing. I expected sections here like 7.1.5.1 "JokeServer" and 7.1.5.2 "JokeClient."
3) It's not clear from the "JokeServer" example whether the server is meant to be another iPhone or a Mac. And in general it seems you'd want to focus more on the client side of the interaction anyway.
4) It seems like more common networking examples could be have been included, like posting data to a URL. (Perhaps I missed the section on this.)
5) No screen shots of a working example on the iPhone and server, which makes me wonder if it was never actually done by the author.