iPhone SDK Application Development

Errata for iPhone SDK Application Development

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted
PDF Page 19
last but one para

I'd like to withdraw my recent erratum on this page. In fact <void*> works perfectly well, though I'd say <NSObject*> was better. So, the point, far from being a 'serious technical error' is too trivial to mention.

John Wheater  Mar 07, 2010 
PDF Page 19
2nd para from bottom

The 'id' data type is wrongly equated with the C 'void' type. In fact it is a pointer to an NSObject, directly equivalent to <NSObject*>. quote>>>>>> The “id” data type In the example just shown, the id data type ... Think of the id data type as the Objective-C version of a void pointer. <<<<<<<<

John Wheater  Mar 07, 2010 
Safari Books Online 22
Ist code block, 2nd line

I think: [ myClass. setVariable ] = YES; /* setter */ Should be: [ myClass setVariable: YES ]; /* setter */

Anonymous  Feb 16, 2010 
Printed Page 48
2nd line from the bottom (self.window = [ [ [ UIWindow alloc ] initWithFrame: screenBounds ] autorelease ];)

About this "issue", I think I finally found out the reason why it wasn't working. As long as you delete the xib file only (as I did at the beginning) then there will be a white window covering your view. Once (as the book says at page 32, point #2) you remove the information about the nib file inside the info-plist file...then everything works as the book says! my bad Fabio

Fabio Romani  Dec 23, 2009 
Printed Page 48
2nd line from the bottom (self.window = [ [ [ UIWindow alloc ] initWithFrame: screenBounds ] autorelease ];)

it seems that by having this following line in the code: self.window = [ [ [ UIWindow alloc ] initWithFrame: screenBounds ] autorelease ]; causes the compiler to generate an extra white window in front of the view you want to display. Only way I found out to show my view is to add a: [self.window release]; before it, so that it becomes: [self.window release]; self.window = [ [ [ UIWindow alloc ] initWithFrame: screenBounds ] autorelease ]; so it seems that a window gets generated before your self.window command and your self.window command is not able to replace it unless you release the "current" window first Fabio

Fabio Romani  Dec 22, 2009 
Safari Books Online 137
Example 5-1 caption

Text should read: Example 5-1. BounceDemo application delegate prototypes (BounceDemoAppDelegate.h) In other words: BouceDemo is missing and "n."

Carson Reynolds  Dec 02, 2009 
Printed Page 81
"Timing Function" section

The constants listed are not the proper constants and the code sample is entirely wrong. The timingFunction property takes a CAMediaTimingFunction object. The sample code should read more like: myTransition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; It should be noted that this is the default timing and so does not need to be specified. The code sample (and corresponding code on page 85) works only because the UIViewAnimationCurveEaseInOut is an enum value of 0, automatically converted at runtime to "nil".

Keary Suska  Dec 01, 2009 
Printed Page 47
Chapter: Hello World...

The "Hello World!" text will not appear. Sometimes it will flicker for a short moment when I quit the app. Typed in the app for myself and also downloaded the code example. It seems that it has to do with SDK 3.1.2. Because the books foreword is from Jan 2009 I expected that a new SDK should run. Did someone has any suggestion?

Oliver Christmann  Nov 05, 2009 
Printed Page 76
Chapter 3

UINavigationController *navigationController on both @interface RootViewController and CreditsViewController are unnecessary.

Giuseppe Cigala  Oct 10, 2009 
Printed Page 204
dealloc () method

why there is no [gps release]? Thanks

Giuseppe Cigala  Sep 21, 2009 
PDF Page 269
Orientation section

"Use the image’s imageOrientation property to set its orientation: myImage.imageOrientation = UIImageOrientationUp;" This is impossible. The imageOrientation property is read-only.

Vocaro  Aug 18, 2009 
PDF Page 321
MinimumValue & MaximumValue

MinimumValue A numeric field identifying the minimum value for the slider. You can define this as either an integer type field or a real type field, depending on whether you want values represented as integers or floating-point numbers. An example follows: <key>MinimumValue</key> <real>10.0</real> MaximumValue A numeric field identifying the minimum value for the slider. You can define this as either an integer type field or a real type field, depending on whether you want values represented as integers or floating-point numbers, and it should match the type used to set the MinimumValue field.

Anonymous  Aug 15, 2009 
Printed Page 64
2nd line

#impo rt "SourceReaderViewController.h" extra space in there.

Darren Inksetter  Jul 26, 2009 
Printed Page Example 12-3
Multiple locations in the example

I think that the CovertFlow example contains some memory managment errors. In CFView implementation: The CFView class doesn't have a dealloc method. The cfIntLayer allocated in initWithFrame is never released. In CovertFlowViewController implementation: in init: UIImage objects created in the for() loop are never released. [image release]; should be added after [covers addObject: image]; in dealloc: covers are not released

Anonymous  Jul 10, 2009 
PDF Page 48
Example 3.5, near bottom of page

I'm still a beginner with Objective-C, so take my corrections with a grain of salt. As published, this line causes a build error: self.window = [ [ [ UIWindow alloc ] initWithFrame: screenBounds ] autorelease ]; I wasn't sure why 'self' would need to be specified, so I removed that. This resulted in a successful build, but only a blank screen appeared. I think perhaps 'autorelease' is inappropriate? A manual release is done within the dealloc, after all. I changed the line to: window = [[UIWindow alloc] initWithFrame: screenBounds]; This produces a successful build and displays the "Hello World" MainView.

timknauf  Jun 10, 2009 
Printed Page 78
initWithAppDelegate Method

UIBarButtonItem action currently reads "action: @selector(back)" Should read "action: @selector(back:)"

Anonymous  Apr 24, 2009 
PDF Page 316
2nd Paragraph of "Reading Property Lists"

On the line of the example beginning "NSString path" it should be "NSString* path". (I made a typo on previous submission)

Anonymous  Apr 23, 2009 
PDF Page 316
2nd Paragraph of "Reading Property Lists"

In the line of the code example beginning "NSString path" it should be "NSString path*".

Adrian Burgess  Apr 23, 2009 
Printed Page 34
Last paragraph

The paragraph begins with "If you take a look at prototype for a project's…" So, minimally, there should be an article just before "prototype," ("the" or "a"). But even with that correction, I don't know what's being referred to here. How do I look at the prototype? A screenshot or simply some additional direction would be helpful.

Mike Ruiz  Apr 10, 2009