Errata

Head First iPhone and iPad Development

Errata for Head First iPhone and iPad 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
Other Digital Version x
Chapter 2 downloaded code

Chapter 2 downloaded code does not have a connection between the rootViewController and the instaEmailViewController. The App would launch correctly the first time, but subsequent tries would display the message:

Applications are expected to have a root view controller at the end of application launch

I made the connection and the App was able to launch more than once. FYI I am running iOS 5 Beta 6.

Amazing book, great job!!
Mic

Mircea Capota  Aug 22, 2011 
PDF Page 8
couple places

We're asked to start a view-based application. In the version of Xcode 4 you download following the instructions, you don't have that option. I'm unclear if we're supposed to use 'single view application' or... what.

I would guess Xcode changed since the book came out in June, but this is a blocking issue in the first chapter.

Derek Zumsteg  Dec 23, 2011 
Printed Page 21
bottom example code

On page 20 there in the section for iDecideViewController.m the example shows I should have an automatic generated section for

-(void)dealloc{
[super dealloc];
}

and I am to add the line

[decisionText_ release]

I'm using Xcode 4.1 rather than the 4.0 that the book seems to use, but this section was not auto-generated. I am wondering with Xcode 4.1 if this section is actually needed. The program seems to compile and launch OK with or without it.

Anonymous  Sep 30, 2011 
Printed Page 73
middle of page


iOS magnet exercise: Extremely unclear as to what final code is supposed to look like. 'Magnets' fit badly into blanks and look to be covering or omitting important syntax bits. Please reply with or point me to correct complete code.

Thank you.

Erick Watson  Feb 02, 2015 
128
Bullet Point 2

When using the [sender resignFirstResponder]; method in Chapter 3 the program compiles and runs, but then crashes on after tapping the "Done" button on a Mac OS X 10.7.2 Lion host running XCode 4.1 Build 4B103. This issue occurs on both the code that I wrote and the code downloaded from the website. The error is EXC_BAD_ACCESS.

Using the same code on a 10.6.8 host runs without problems.

Anonymous  Sep 15, 2011 
Printed Page 146
Entire book

The book instructions do not correspond to Xcode 4.2. For example, on page 146, you say to choose a Navigation-based Application, but Xcode 4.2 does not offer that option. It appears that the option "Master-Detail Application" is the closest one, but that does not include a MainWindow.xib. Please provide updated instructions for each example in the book.

William Schmidt  Jan 08, 2012 
Printed Page 176
Step 5, sentence 1 and 2

You said, the UITextField 'nameTextField' should be set uneditable. But for the UITextField the described checkbox 'Editable' is not available in the inspector. So this solution only works for the two UITextViews.

MacOS X 10.6.8
Xcode 4.0.2

Roland Eisner  Aug 30, 2011 
PDF Page 218
Image

The image shows a version of the DrinkMixer app with detail disclosure buttons instead of disclosure indicators.

Anonymous  Dec 29, 2011 
Printed Page 248
Question No. 10

Question No. 10 of the iOSDev cross is missing.
Also on next page (250) the solution is missing and also for question no. 9.

Roland Eisner  Sep 06, 2011 
Printed Page 346
first line of first code sample

the class name is wrong.
It should be 'RootViewController' instead of 'DrinkDetailViewController'

Sep 19, 2011 
Printed, PDF Page 387
2nd code view picture at top

code shows:

[tabBarController_release];

should be:

[tabBarController_ release];

(with a space)

Bobby  Sep 07, 2011 
PDF Page 387
1st paragraph

I think there is one typo.
Fast of Page.387 is as follows;
@synthesize tabController=tabBarController_;

I think correct is as follows;
@synthesize tabBarController=tabBarController_;


Thanks

Kuninori Hirano  Nov 21, 2011 
PDF Page 423
United States

In the top code image, the line BOOL dbExists line says

BOOL dbexists = [fileManager fileExistsAtPath:writableDBPath path];
if (!dbexists)

which causes the app to crash.

but the sample code shows:

BOOL dbExists = [fileManager fileExistsAtPath:[writableDBPath path]];
if (!dbExists)

which doesn't crash the app.

capital "E" in exists and brackets around writableDBPath path (as well as the addition of "path")

bobby  Oct 05, 2011 
Printed Page 429
First solution box

In the long exercise solution showing the FugitiveDetailViewController.h implementation, the necessary #import "Fugitive" statement is omitted.

The code will not compile as shown.

Anonymous  Sep 14, 2011 
Printed Page 470
last statement in method

self.capturedDateLabel.text = @"" belongs within the "else" brackets. The comment about the statement is misleading. I just submitted this error for the wrong book(iphone only). Sorry!

Sandy B.  Sep 05, 2011 
PDF Page 470
code magnets solution

The arrow "This will return a text representation of an NSDate" pointing to @"" might be a bit misleading. Is it perhaps supposed to point to [fugitive_captdate description] instead?

Anonymous  Jan 02, 2012 
Printed Page 483
2nd and 3rd statements in method

Appears in book :
detailViewController.fugitive = [self.resultsController
objectAtIndexPath:indexPath];
[self.navigationController pushViewController:fugitiveDetailViewController animated:YES];

should be:
detailViewController.fugitive = [items_ objectAtIndex:indexPath.row];
[self.navigationController pushViewController:detailViewController animated:YES];

Sandy B.  Sep 07, 2011 
PDF Page 512
Ready Bake Code

It might perhaps be worth pointing out that setting the value of picker.allowsEditing to NO (rather than YES) necessitates changing the value of the key in

fugitive_.image = UIImagePNGRepresentation([info objectForKey:UIImagePickerControllerEditedImage]);

Keeping UIImagePickerControllerEditedImage in this case seems to imply that the returned image is nil.

Anonymous  Jan 06, 2012