small medium large xlarge

Errata for iPhone SDK Development

 

The latest version of the book is P2.0, released almost 7 years ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: B14.0 (29-Jun-09)
#39736
PDF page: 19
mobi version does not display some text correctly. For example the text on page 19 of the pdf, second sentence under the section titled "Created the H...more...
  • Reported in: B14.0 (21-Jun-09)
  • Fixed: 16-Oct-10, awaiting book release
#39581
PDF page: 24
enjoying working with your book. found a small problem using the iphone in Unnamed Chapter page 24/28 4.94% into book or pdf book page 43 line 4...more...
  • Reported in: P2.0 (02-Mar-10)
  • Fixed: 16-Oct-10, awaiting book release
#42393
PDF page: 34

In the second sentence, "…review the directions in…"--Bruce Hobbs

  • Reported in: P2.0 (28-Apr-10)
  • Fixed: 16-Oct-10, awaiting book release
#43007
Paper page: 35
In the second last paragraph the instructions are confusing. You say, "When you release the mouse, as small HUD (What is a HUD, BTW) window will pop u...more...
  • Reported in: P2.0 (21-Aug-10)
  • Fixed: 16-Oct-10, awaiting book release
#44674
PDF page: 38

After the second paragraph shouldn't the index value in the code example be 2 rather than 3?--Bruce Hobbs

  • Reported in: P1.0 (03-Jan-10)
  • Fixed: 16-Oct-10, awaiting book release
#41989
PDF page: 47
The screenshot on page 47 shows the placeholder text as "Type your name", however, on page 45, the placeholder text is "Name", as is the example text ...more...
  • Reported in: P2.0 (02-Mar-10)
  • Fixed: 16-Oct-10, awaiting book release
#42395
PDF page: 50
Last sentence of the penultimate paragraph: "…load the application from a nib file." Don't you mean obtain obtain the values for the third and fourth ...more...
  • Reported in: B11.0 (09-Apr-09)
#38815
PDF page: 52
in the .mobi version of this file (approximately location 620 on a Kindle), the 2nd graphic on PDF page 52 is 90% blank, with the real graphic taking ...more...
  • Reported in: B13.0 (15-May-09)
#39197
PDF page: 54
This is an erratum for the formatting of the PDF, not the text of the book: The first page of this and every chapter is missing the "Report erratum" ...more...
  • Reported in: P2.0 (23-Aug-10)
  • Fixed: 16-Oct-10, awaiting book release
#44685
PDF page: 55

First sentence of fourth paragraph: "It doesn't update the hello label or clear the name field, because…."--Bruce Hobbs

  • Reported in: P2.0 (02-Mar-10)
  • Fixed: 16-Oct-10, awaiting book release
#42396
PDF page: 55

First paragraph, first sentence: Shouldn't "…copy and pasting…" actually be "…copying and pasting…?"--Bruce Hobbs

  • Reported in: P2.0 (22-Feb-10)
  • Fixed: 16-Oct-10, awaiting book release
#42360
Paper page: 67
Line [formatter setNumberStyle:NSNumberFormatterCurrenctyStyle]; results in an empty string return from numberFromString (self.movie.boxOfficeGross ...more...
  • Reported in: P2.0 (26-Aug-10)
  • Fixed: 16-Oct-10, awaiting book release
#44720
PDF page: 68

Did I miss the explanation for the use of "copy" in the @property declarations in Movie.h?--Bruce Hobbs

  • Reported in: P2.0 (08-Apr-10)
  • Fixed: 16-Oct-10, awaiting book release
#42720
Paper page: 68

Text says "Change the Class field to MovieEditorViewController..." however the graphic shows MovieViewController--David Swearingen

  • Reported in: P1.0 (03-Jan-10)
  • Fixed: 16-Oct-10, awaiting book release
#41990
Paper page: 69
In this example, we are linking the view in a xib file that we created ourselves for the first time. The oh-so-important line of text that tells the ...more...
  • Reported in: P2.0 (26-Aug-10)
  • Fixed: 16-Oct-10, awaiting book release
#44721
PDF page: 69
Shouldn't the fifth sentence of the first paragraph begin, "Assigning to self what…?" Would also seem helpful to include at least some explanation of ...more...
  • Reported in: P1.0 (03-Jan-10)
  • Fixed: 16-Oct-10, awaiting book release
#41992
Paper page: 70
I suggest clarifying at the bottom of the page that the *title* text field should be configured to capitalize words. The box office gross is a number...more...
  • Reported in: P2.0 (08-Mar-10)
  • Fixed: 16-Oct-10, awaiting book release
#42433
PDF page: 73
The sentence states, "The interest-ing thing here is why choose viewDidLoad." This sentence reads wierdly and jarred me out of iPhone-land. Perhaps it...more...
  • Reported in: P2.0 (08-Apr-10)
  • Fixed: 16-Oct-10, awaiting book release
#42735
Paper page: 73

I could not find a mention of the need to include
#import "MovieEditorViewController.h"
in MovieViewController.m. --David Swearingen

  • Reported in: P2.0 (08-Apr-10)
  • Fixed: 16-Oct-10, awaiting book release
#42736
Paper page: 73
MovieViewController.m MUST have the following line however I cannot find a mention of this anywhere: @synthesize editingViewController;--David Swear...more...
  • Reported in: P2.0 (28-Apr-10)
  • Fixed: 16-Oct-10, awaiting book release
#43004
PDF page: 74

In the last paragraph, the word "choose" seems like it should have been "chose."

  • Reported in: P1.0 (11-Jan-10)
  • Fixed: 16-Oct-10, awaiting book release
#42063
PDF page: 75
Section 4.6, first sentence, reads: "Let’s now create a second view controller that we will use to manage the modal view." I think that should be *mo...more...
  • Reported in: P2.0 (07-Feb-10)
  • Fixed: 16-Oct-10, awaiting book release
#42260
PDF page: 79
Section 4.7 first screen shot from IB shows the incorrect class for the file's owner of the MovieEditorViewController. It shows Class set to MoveViewC...more...
  • Reported in: P1.0 (22-Mar-10)
  • Fixed: 20-Oct-10, awaiting book release
#42488
Paper page: 82
UITableViewCellStyleValue1 and 2 descriptions say they are intended only for use in group-style tables. Why is that? They seem to work ok in plain t...more...
Chris Adamson says: From Apple's iOS Human Interface Guidelines: "Although you can use the value 1 table-cell style in either a plain or a grouped table, its appearance is better suited to a grouped table. For example, the Usage screen in Settings uses the value 1 style in grouped tables:" "Although you can use the value 2 table-cell style in either a plain or a grouped table, it looks much better in a grouped table. For example, the Info screen in Contacts uses the value 2 table-cell style in grouped tables:" They work, but they're inappropriate - we're just passing along Apple's guidance here.
  • Reported in: P2.0 (12-Feb-10)
  • Fixed: 16-Oct-10, awaiting book release
#42300
PDF page: 83
I find the heading "4.8 Making the MovieEditorViewController" confusing since a previous section described the creation of that class and .xib file. ...more...
  • Reported in: P2.0 (13-Feb-10)
  • Fixed: 16-Oct-10, awaiting book release
#42305
PDF page: 83

"This last step is optional." it is never said what is the last step, I figure that it is selecting the checkbox on clear when editing begins

  • Reported in: P2.0 (13-Feb-10)
  • Fixed: 16-Oct-10, awaiting book release
#42306
PDF page: 84

you forgot to mention to
#import "MovieEditorViewController.h"

otherwise xcode fails with strange errors around
self.editingViewController

  • Reported in: P2.0 (10-Oct-11)
#47726
PDF page: 84
- (IBAction)edit { self.editingViewController.movie = self.movie; [self presentModalViewController:self.editingViewController animated:YES]; } cau...more...
  • Reported in: P1.0 (17-Dec-09)
  • Fixed: 20-Oct-10, awaiting book release
#41859
PDF page: 86
There is a bug in the source code for chapter 5 Bug: Memory Leak File: <base>/TableViews/MovieTabler02/Classes/RootViewController.m Line: 56 Desc...more...
  • Reported in: P1.0 (29-Dec-09)
  • Fixed: 20-Oct-10, awaiting book release
#41942
Paper page: 86
First, in the last paragraph, "You might recall from Section 5.2 ... that in MainView.xib ...". There is no MainView.xib--this should be MainWindow.xi...more...
  • Reported in: P1.0 (18-Jan-10)
  • Fixed: 20-Oct-10, awaiting book release
#42099
Paper page: 89
The book states "Add an instance variable MovieEditorViewController* movieEditor;" The code has the asterisk prior to "movieEditor;" thusly "*movie...more...
  • Reported in: P2.0 (26-Oct-10)
  • Fixed: 26-Oct-10, awaiting book release
#45435
PDF page: 90
Noob question: In the last sentence on this page is there any particular reason to add the #import "Movie.h" to RootViewController.h rather than RootV...more...
  • Reported in: P2.0 (26-Oct-10)
  • Fixed: 26-Oct-10, awaiting book release
#45436
PDF page: 91
Another noob question: Doesn't the moviesArray instance variable mentioned in the second sentence of the first paragraph also need to be released in t...more...
  • Reported in: P2.0 (26-Oct-10)
  • Fixed: 26-Oct-10, awaiting book release
#45437
PDF page: 97

First paragraph, fifth sentence: Shouldn't that be "For the latter…"?--Bruce Hobbs

  • Reported in: P2.0 (31-Aug-10)
  • Fixed: 20-Oct-10, awaiting book release
#44779
PDF page: 97

First paragraph, third sentence: Shouldn't that be "…support the former…?"--Bruce Hobbs

  • Reported in: P2.0 (26-Oct-10)
  • Fixed: 26-Oct-10, awaiting book release
#45438
PDF page: 100
In the second sentence of the third paragraph you suggest adding the #import in the header file where previously you'd suggested using @class in the h...more...
  • Reported in: P2.0 (26-Oct-10)
  • Fixed: 26-Oct-10, awaiting book release
#45439
PDF page: 100

Fourth paragraph, third sentence: Previously you also had us set the Nib File attribute.--Bruce Hobbs

  • Reported in: P2.0 (13-Feb-10)
  • Fixed: 20-Oct-10, awaiting book release
#42304
PDF page: 107
In the section "Loading and Using a Custom Table Cell", 3rd line: the phrase "...we try to fail to dequeue..." is confusing. Did you mean just "we fa...more...
  • Reported in: P2.0 (26-Oct-10)
#45442
PDF page: 107
In third paragraph, after describing creation of @property for IBOutlet nibLoadedCell you might want to remind people, as you've done several times pr...more...
  • Reported in: P2.0 (11-Feb-10)
  • Fixed: 20-Oct-10, awaiting book release
#42294
Paper page: 108
The example code has an 'initWIthFrame:CGRectZero', which according to page 84, has been depricated for iPhone SDK 3.0. It should read 'initWithStyle:...more...
Chris Adamson says: The current version of the book covers iPhone OS 3.0, but we chose to make sure that our code would compile and run on 2.0 as well, so we used 2.0 conventions where necessary, such as -[UITableViewCell initWithFrame:reuseIdentifier:] rather than 3.0's -[UITableViewCell initWithStyle:reuseIdentifier].
  • Reported in: P2.0 (26-Oct-10)
#45443
PDF page: 111

Fourth paragraph, third sentence: any reason not to add [self handleSortChanged] rather than duplicate its two lines?--Bruce Hobbs

  • Reported in: P2.0 (29-Jun-10)
  • Fixed: 20-Oct-10, awaiting book release
#43909
PDF page: 112

Should sortMoviesArray also call [sortDescriptors release] before it's done?--Michael Bass

  • Reported in: P2.0 (27-Oct-10)
#45452
PDF page: 112
In the sortMoviesArray method is there some reason not to alloc when declaring sorter instead of repeating the alloc in each of the three cases? NS...more...
  • Reported in: P2.0 (20-Mar-10)
  • Fixed: 21-Oct-10, awaiting book release
#42472
PDF page: 118
Both picture and the text on p. 118 show that Table View for RootViewController has a navigation bar, however that's not what I see in XCode 3.2.1 (iP...more...
Chris Adamson says: As with the last chapter (see p. 100 in p2.0), the simulated navigation bar is added by using the "simulated interface elements" in the attribute inspector (cmd-1) for the table. We'll make this explicit in the next edition.
  • Reported in: P1.0 (09-Jan-10)
  • Fixed: 20-Oct-10, awaiting book release
#42025
PDF page: 119

UITableViewCell method initWithFrame:reuseIdentifier: is deprecated in iPhone OS 3.0--Florian Maunier

Chris Adamson says: The current version of the book covers iPhone OS 3.0, but we chose to make sure that our code would compile and run on 2.0 as well, so we used 2.0 conventions where necessary, such as -[UITableViewCell initWithFrame:reuseIdentifier:] rather than 3.0's -[UITableViewCell initWithStyle:reuseIdentifier].
  • Reported in: P2.0 (21-Feb-11)
#46427
Paper page: 120
the code sample for "StatesAppDelegate.m" in the download and in the book for "applicationDidFinishLaunching" is missing the last line "[self.window ...more...
  • Reported in: P2.0 (07-Feb-10)
  • Fixed: 16-Oct-10, awaiting book release
#42263
PDF page: 122
In the last paragraph it says: <br> "Right-click the Classes group in Xcode, and choose Add > New File. Choose to make a subclass of UITableViewCont...more...
  • Reported in: P2.0 (20-Mar-10)
  • Fixed: 16-Oct-10, awaiting book release
#42473
PDF page: 125

numberOfSectionsInTableView: should also be implemented - it's shown in the source on the website but isn't mentioned in the book--Victor Kryukov

  • Reported in: P2.0 (07-Feb-10)
  • Fixed: 16-Oct-10, awaiting book release
#42264
PDF page: 130
Second paragraph ends with: "The delegate adds the view defined by the tabBarController onto the window. Here is the code: - (void)application...more...
  • Reported in: P2.0 (07-Feb-10)
  • Fixed: 16-Oct-10, awaiting book release
#42265
PDF page: 131
Page starts with: <<der of the data for the other states is created in the same way and added to the same data array but not shown.1 NSMutableA...more...
  • Reported in: P2.0 (29-Oct-10)
#45461
PDF page: 131
Shouldn't there be something similar to the statement in the third paragraph regarding the @property for the states variable to handle the statesByPop...more...
  • Reported in: P2.0 (24-Feb-10)
  • Fixed: 16-Oct-10, awaiting book release
#42368
PDF page: 132
I use the latest 3.1.3 iPhone SDK on the latest Snow Leopard version. There, the creation of a "UITableViewController" subclass has changed: The book...more...
  • Reported in: P2.0 (29-Oct-10)
#45460
PDF page: 132
First ByPopulationViewController.m code snippet: Shouldn't mention be made that reference to StatesAppDelegate class requires #import of its header fi...more...
  • Reported in: P2.0 (30-Oct-10)
#45466
PDF page: 133
Since both the table view data source methods use the view controller's states getter isn't the app delegate's states array going to be sorted six tim...more...
  • Reported in: P1.0 (12-Jan-10)
  • Fixed: 16-Oct-10, awaiting book release
#42069
PDF page: 134
I needed to explicitly connect the delegate and dataSource outlets on the TableView that is a child of the ByPopulationViewController for the example ...more...
  • Reported in: P2.0 (30-Oct-10)
#45470
PDF page: 142
Second bullet point between second and third paragraphs: Previously you've suggested using @class when we needed to refer to another class in a header...more...
  • Reported in: P1.0 (02-Apr-10)
  • Fixed: 21-Oct-10, awaiting book release
#42607
Paper page: 145
The book names the wrong class to use as the File's Owner for the "FileContentsView.xib" nib file in the first paragraph beneath the code on page 145....more...
  • Reported in: P1.0 (20-Dec-09)
  • Fixed: 21-Oct-10, awaiting book release
#41872
PDF page: 156
Paper page: 147
In the loadFileContentsIntoTextView method the comment on line 6 reads // read and dump to NSTextView NSTextView is not available in Cocoa Touch, bu...more...
  • Reported in: P2.0 (04-Nov-10)
#45515
PDF page: 161
Last sentence (and related code snippet on the following page): Shouldn't the final argument be nil (which is the way it's coded in the initWithTitle:...more...
  • Reported in: P1.0 (13-Mar-10)
  • Fixed: 21-Oct-10, awaiting book release
#42445
Paper page: 171

2nd paragraph:

"... and implement them in FlipSideViewController.h" should read "FlipSideViewController.m"--Stephen Watson

  • Reported in: P2.0 (21-Nov-10)
#45701
PDF page: 175
Rather than have the default time zone stored both in the settings file and hard-coded in the app wouldn't it be more DRY to retrieve that value from ...more...
  • Reported in: P2.0 (12-Nov-10)
#45578
PDF page: 179
First paragraph, end of fourth sentence: "…that you should have added earlier." Can't seem to find anything earlier suggesting that addition.--Bruce H...more...
  • Reported in: P2.0 (02-Apr-11)
#46721
PDF page: 180
When instructing to implement a new getter. End of the second paragraph reads: "... and implement them in Flip- sideViewController.h." Shoud read: ...more...
  • Reported in: P2.0 (21-Nov-10)
#45699
PDF page: 190
Is there some reason why the code fragment on this page uses NSStrings for the preference specifier keys while the code fragment on page 175 uses #def...more...
  • Reported in: P1.0 (16-Dec-09)
  • Fixed: 21-Oct-10, awaiting book release
#41842
PDF page: 191
In loadprefs function, userTimeZone is assigned return value of method 'stringForKey' which is not alloc, new and copy but is released after simple as...more...
  • Reported in: P1.0 (16-Dec-09)
  • Fixed: 21-Oct-10, awaiting book release
#41845
PDF page: 191
Your code for loading settings from the Settings.bundle is erroneous. The settings aren't created until you go to Home/Settings/Your App, so show24Hou...more...
  • Reported in: P2.0 (21-Nov-10)
#45697
PDF page: 191
Is there some reason why conditional tests sometimes evaluate objects for equality/inequality to nil or NULL (as in the two codes samples on this page...more...
  • Reported in: P1.0 (08-Dec-09)
#41757
PDF page: 196

None of the SQL in the SQLite chapter shows up on the Kindle DX in .mobi format--Greg Cheong

  • Reported in: P2.0 (23-Nov-10)
#45735
PDF page: 196
Last two sentences of first paragraph seem to assume that a new Xcode project has been created or that the downloadable code for this chapter has been...more...
  • Reported in: P2.0 (27-Nov-10)
#45781
PDF page: 198
The last sentence of the third paragraph concludes "…a label at the bottom that we'll use to confirm each add." This confirmation process is not other...more...
  • Reported in: P2.0 (24-Nov-10)
#45738
PDF page: 201
Penultimate sentence of final paragraph: Any particular reason why this constant name is upper-case? Previous code only used upper-case when implement...more...
  • Reported in: P2.0 (24-Nov-10)
#45736
PDF page: 202
There seems to be nothing in the text identifying the method which is supposed to contain the code fragments on this page and the next page. There's a...more...
  • Reported in: P2.0 (24-Nov-10)
#45741
PDF page: 202
The code fragment doesn't use the setter for dbFilePath even though the first sentence of the last paragraph on the previous page specifies that dbFil...more...
  • Reported in: P2.0 (25-Nov-10)
#45761
PDF page: 209
The last sentence of the second paragraph states that the following code fragment comes from the initWithNibName:bundle: method, but the actual code c...more...
  • Reported in: P2.0 (26-Nov-10)
#45778
PDF page: 211

No other mention (other than the downloaded code itself) of priceFormatter shown in last line of code fragment.--Bruce Hobbs

  • Reported in: P1.0 (26-Jan-10)
#42188
Paper page: 227
The error is with the errata reporting on the website. For example, what is on p227 of P1.0 of the printed book is showing up on errata as if belongs ...more...
  • Reported in: P2.0 (25-Feb-10)
  • Fixed: 16-Oct-10, awaiting book release
#42373
PDF page: 228
I use the latest 3.1.3 iPhone SDK on the latest Snow Leopard version. For me, the generated "Track.h" doesn't have the lines that start with "@interf...more...
  • Reported in: P1.0 (05-Jan-10)
  • Fixed: 16-Oct-10, awaiting book release
#42014
PDF page: 236
There seems to be a memory leak under the "NSFetchedResultsChangeInsert" clause in -(void)controller:didChangeObject:atIndexPath:forChangeType:newInde...more...
  • Reported in: P2.0 (21-May-11)
#47093
PDF page: 238
It seems that due to Framework changes, the code for editing tracks in place doesn't work anymore. On iOS 4.3, I observe the following: - self.editin...more...
  • Reported in: P2.0 (05-Feb-11)
#46362
PDF page: 303

In the last paragraph before the code, "MPVideoController" should be "MPMoviePlayerController".--Barry Simpson

  • Reported in: P2.0 (29-Jan-10)
  • Fixed: 21-Oct-10, awaiting book release
#42214
PDF page: 306

MPMoviePlayerController's MPMoviePlayerContentPreloadDidFinishNotification is deprecated in favor of the loadState property.--Florian Maunier

Chris Adamson says: The deprecation is in iPhone OS 3.2, and the book is written to cover 3.0. We can use the new property in future versions of the book covering iOS 4 or later.
  • Reported in: P1.0 (06-Jan-10)
  • Fixed: 16-Oct-10, awaiting book release
#42016
Paper page: 377

The example application "Draw" seems to be missing the code to actually draw the dots.--Michael Nygard

  • Reported in: P2.0 (18-Aug-10)
  • Fixed: 26-Oct-10, awaiting book release
#44648
PDF page: 459
The code download dated 2/3/10 contains an error in the code for the Distance Application in the Location directory. In particular the file named D...more...
  • Reported in: P1.0 (10-Jan-10)
  • Fixed: 21-Oct-10, awaiting book release
#42048
PDF page: 460

"its" should be "it's":

"if we have a valid location, and its within 20 meters then stop"--Anh Quang Do

  • Reported in: P2.0 (29-Jan-10)
  • Fixed: 16-Oct-10, awaiting book release
#42213
PDF page: 462

CLLocation's getDIstanceFrom: is deprecated in favor of CLLocation's distanceFromLocation: in iPhone OS 3.2--Florian Maunier

Stuff To Be Considered in the Next Edition

  • Reported in: B11.0 (05-Apr-09)
#38742
PDF page: 1
I just spent half my day messing around with scroll views before finding a video that happened to mention the property I needed to set (contentSize) t...more...
  • Reported in: B15.0 (17-Aug-09)
#40471
PDF page: 113
...set the titles of the segments to A-Z, Z-A, and $ (or whatever monetary symbol makes the most sense for your locale)... Might be nice to have an...more...
  • Reported in: P1.0 (12-May-10)
#43199
PDF page: 159
I wonder whether using initWithBytesNoCopy might not work properly if the content of the stream has characters that have their representation in UTF8 ...more...
Chris Adamson says: Interesting point. We should revisit this in a future edition (too big a change for simple reprints)
  • Reported in: B11.0 (11-Mar-09)
#38309
PDF page: 223
Would it be possible to get more information on working with images? It'd really be helpful to have more information on things like image zoom and man...more...
  • Reported in: P2.0 (04-Feb-10)
#42256
Paper page: 229
This is a suggestion for the next edition: I was very disappointed on page 229 to read paragraph "Since the mechanics of navigation...". I understan...more...
  • Reported in: B14.0 (19-Jun-09)
#39567
PDF page: 492
As far as I can see, this chapter does not directly address the interpretation of crash logs. Because we may get crash logs from Apple, once an appli...more...
Chris Adamson says: Too big a task for this edition, but we'll keep it in mind for the next. Thanks.