By Developers, For Developers

Historical errata for iOS SDK Development

PDF PgPaper PgTypeDescriptionFixed onComments
2ERROR

“Install Xcode 4” <— Isn’t this now deprecated?
As of Xcode 4.3: “This version of Xcode is distributed as a single application bundle, Xcode.app. The Install Xcode application is no longer needed.”

2012-01-05Xcode 4.3 is still under NDA. We will update the book as needed to reflect the behavior of pubicly-available versions. Thanks for the reminder.
31TYPO

“To the left of that, we use the compiler directive @property, along with attributes for the property in parentheses: (nonatomic, retain).”

… should be…

“…(nonatomic, strong).”

2011-12-29
35SUGGEST

Missing footnote on the definition of ‘singleton’:

“But a lot of apps don’t do any of these things, so we don’t often interact with the UIApplication singleton. ”

2012-01-08
69SUGGEST

While Apple’s documentation covers what “nonatomic” “retain” and so on mean in @property definitions, I think your book would benefit from a call-out on those properties as you first use them. Not a verbatim definition but a “We think of ”nonatomic" this way (more of what your internal voice is saying as you read across such a definition). “strong” and “copy” and “retain” still trip me up because few authors say why they’re using that declaration there. For example, on page 69, you could add (and correct my non-confident stab at it!) “We declare the recipe property as nonatomic with a retain because our controller is going to own the recipe object throughout its lifecycle.” or something better than that!

2012-01-09
67TYPO

“over ridding” should be “over riding” unless you are trying to rid yourself of the init method!

2011-12-29
39SUGGEST

Needs a footnote for: ‘i18n’.

2.8 Internationalization
“— hereafter abbreviated as i18n.” — Don’t understand what ‘i18n’ means.

2012-01-05I don't understand the objection. "Internationalization" is defined in the first line of the paragraph ("the ability of code to adapt to local conventions in different parts of the world."), and the "i18n" acronym is explained in the "hereafter" phrase ("hereafter abbreviated as i18n for the first and last letters and the 18 in between"). I'm going to mark this as fixed; feel free to open a new erratum with a more extensive description if you like.
73SUGGEST

This sentence doesn’t feel “whole” - “Setting our view controller to be the rootViewController for our window followed immediately by makeKeyAndVisible.” Is it a legacy sentence that was left in after the subsequent sentences improved upon (and were meant to replace) it?

2011-12-29
39SUGGEST

Need a footnote for “l10n”.

“To add a localization for a file, abbreviated “l10n”, …" — I don’t know what ‘l10n’ means.

2012-01-05
84TYPO

A double-right quote got substituted where an emdash was probably meant to be:
The top and bottom cells within a section have rounded “end caps”, — which makes a one-cell section look like a button ” and the section headers scroll with the background.

should be … look like a button - and the section…

2011-12-29
84TYPO

“to serve at the model,” should be “to serve as the model,”

2011-12-29
86TYPO

“The final step in our lazy creation code is to assign our recipes property to the localRecipes array that we have populated.”

Aren’t you assigning the localRecipes array to the recipes property?

self.recipes = localRecipes;

If correct, that would make the sentence read:

The final step in our lazy creation code is to assign our localRecipes array to the recipes property.

2011-12-29
65TYPO

Last sentence of first paragraph: “…how to [store?] our recipe model….”

2011-12-29
65TYPO

At the beginning of the last sentence of the second paragraph: “Then we can we can build….”

2011-12-29
67TYPO

At the end of the last sentence: “…it’s time [to] build the controller.”

2011-12-29
9080TYPO

In the third sentence of the last paragraph: “…connected to via i[t]s view property….”

2012-01-09
8TYPO

quick help NO the current selection are always available

Should be:

quick help ON the current selection are always available

2011-12-29
96TYPO

At the bottom of the page, on the green bar to download the code, you are saying to download PRPRecipesSource.m, but in the text immediately above you’re saying to add the code to the top of the PRPRecipesListDataSource.m file. Is the green bar correct?

2012-01-09
99TYPO

prepartation time? :-)

[recipe prepartationTime],

2012-01-09
110OK

Where you instruct us to copy over the header and implementation files for all the reusable classes, it would be really nice to put in download links right there, since in the preceding chapter endings we’ve been encouraged to experiment, leaving our source code different from your expected state.

2012-01-09PML does not support placing links in lists.
30TYPO

Just below the instance variable anti-example:

“But don’t write that. We won’t be using interface variables in this book…”

Should be instance

2011-12-29
86SUGGEST

Explain the purpose of using: if (nil recipes) versus: if (recipes nil).

2012-01-09
123TYPO

The pictured UI is out of sync with this text:

Also, change the title of the editor’s navigation bar to be “New Recipe”. When done the UI should look similar to Figure 48, Editing UI, on page 124.

Figure 48 still shows “Edit Recipe”

2012-01-09
9788TYPO

At the beginning of the fourth sentence of the second paragraph: “Open the header file and [add] the property….”

2011-12-29
9788TYPO

At the beginning of the first sentence of fourth paragraph the word “on” is duplicated: “A table view relies on on an object….”

2011-12-29
9889TYPO

In the third sentence of the second paragraph: “…method to its data source….” The word “to” should be “of” instead.

2011-12-29
114105TYPO

At the end of the third sentence of the first paragraph: “…user actions like taping on a row.”—“taping” should be “tapping”

2011-12-29
118110SUGGEST

In the last paragraph wouldn’t it have been much simpler to delete the initial view controller, drag a table view controller from the Object library onto the storyboard and then use the Identity inspector to change the class of the table view controller to PRPRecipesListViewController? No reconnecting would’ve been necessary.

2012-01-09
32SUGGEST

Please add info on the dynamic <#property#>. That is, when/why it is used with examples; vs synthesize.

2012-01-08
127119SUGGEST

If you’re going to show the recipe title in the navigation bar does it really make sense to also repeat it in the view content?

2011-12-29
64TYPO

In the fourth paragraph, you write “change the dispatch_get_main_thread() to dispatch_get_current_thread()” but what it should really say is “change the dispatch_get_main_queue() to dispatch_get_current_queue()”

2011-12-29
67ERROR

The text says “In Xcode, open the file RecipesViewController.xib by selecting it in the File Navigator in Xcode.” but I don’t have a RecipesViewController - following the directions gave me file names like the ones listed in Figure 25 (top of page 68).

2011-12-29
69SUGGEST

retain vs strong. On page 31 you say that strong is preferred over retain. If retain is indeed the correct choice for these properties it would be useful to know why.

2012-01-09
53ERROR

“To try it out, change the dispatch_get_main_thread() to dispatch_get_current_thread()” should say “To try it out, change the dispatch_get_main_queue() to dispatch_get_current_queue()”

2011-12-29
13TYPO

Extra ‘an’ on line five of item 1.

It says: ..which will be then be shown with linked bubbles…

Should say, which will then be shown…

2011-12-29
17SUGGEST

It is a lot easier to include the code for the Twitter section if you have the Twitter.framework included in the project and the <Twitter/Twitter.h> imported. Otherwise you don’t get the code completion options.

2012-01-05Good point, but we still want to walk readers through seeing what happens when the #import is missing, since it's such a common mistake. We'll add a line about "oh, and you get code completion too" to the section later when we add the Twitter framework. Thanks.
149141TYPO

The last paragraph of section 6.6 suggests that delegation will be explored later in this chapter. The “Wrap-Up” section, 6.7, immediately follows and its first paragraph says that the chapter covered setting up a delegate protocol. Is there a section missing?

2012-01-09
127119TYPO

Please ignore my previous comment. I see you addressed the issue on the next page. :-(

2011-12-29
9ixTYPO

At the bottom of the page n the bullet item for “Chapter 7, Documents and iCloud:” “…the tools we need [to] save our user’s work….”

2011-12-29
143TYPO

In the last sentence of the second paragraph, “…we[’ll] select….”

2011-12-29
176SUGGEST

The fifth sentence of the “Toolbar” discussion doesn’t mention that the status display also contains a continually updated report of issues. Especially with the “bouncing back-and-forth” development style, keeping an eye on that information helps remind one that there’s more bouncing to be done.

2012-01-08
176TYPO

At the end of the first sentence in the “Navigator Area” paragraph, “projects” should be “project’s”

2011-12-29
127ERROR

There doesn’t appear to be any instruction to import the header file for PRPRecipeEditorViewController into PRPRecipesListViewController. That may be a “kick the birdies out of the nest” choice, but it seems to break from the past hand-holding. I searched the text for “PRPRecipeEditorViewController” looking for an instruction to import it, but didn’t see any. (sign me: gun shy :-)

2011-12-29
187ERROR

In the “Editor Area” paragraph the third sentence, “Its contents depend on what is selected in the navigator pane,” doesn’t seem completely accurate. Although the paragraph never mentions the Jump Bar at the top of the Editor Area, the contents of the area always track the Jump Bar. When the Jump Bar is used to select another file the navigation pane is not updated.

2012-01-08
187SUGGEST

In the “Editor Area” paragraph the discussion of the “assistant” mode only notes one of the four possible ways views may be arranged. It also doesn’t indicate that more than more than two files may be displayed in the area and that they don’t have to be related.

2012-01-08For an introductory 10,000-foot view of the project workspace, mentioning all those uses of the assistant editor is probably much more detail than we can afford this early, especially as we don't use the assistant editor very much in this book.
187SUGGEST

The last sentence of the “Editor Area” paragraph refers to “three main modes” of the editor pane. Are there other “non-main” modes?

2012-01-08
187SUGGEST

In the discussion of the “version” mode in the last sentence in the “Editor Area” paragraph, it might be worthwhile to note there are also two other views.

2012-01-08
130SUGGEST

“Since our text view is in a navigation controller,” except that it’s not yet. I think I have learned the pattern: embed this view controller into a navigation controller and then link them together when the user clicks on the directions field in the recipe editor view controller. But we haven’t done that yet and I’m not good at reading ahead :-)

2012-01-09
131SUGGEST

Change:

self.title = @“Edit Instructions”;

To:

self.title = @“Edit Directions”;

for consistency.

2012-01-09
67TYPO

“RecipesViewController.xib” should be “RPRViewController.xib” in "In Xcode, open the file RecipesViewController.xib by selecting it in the File Navigator in Xcode.

2011-12-29
141ERROR

On page 138 the done:sender method is defined with the sender being of type UIBarButton, but on page 141 the implementation defines it simply as of type id. Is that important? Or a best practice? We don’t use sender, so I don’t foresee warnings about typecast mismatches, so perhaps this is more of a style question. I like to let autocompletion do the work for me, so what is defined in the interface matches exactly what goes into autocompletion in the implementation.

2012-01-09
137ERROR

On page 137 we add the “TapToChoose.png” image. Mine never showed up, not even at the conclusion of the chapter ;-)

Watching the flow of data I went into PRPRecipesSource.m, the createNewRecipe method and added the following line:

recipe.image = [UIImage imageNamed:@“TapToChoose.png”];

before adding the recipe object to the recipes array.

Since no one else has reported this I’m open to having missed something along the way, but I’m pleased to say that this addition to the createNewRecipe method both works and feels right to me.

2012-01-09
141ERROR

On page 140 we define the property recipeListVC and we call it on page 141, but I’ll be darned if I can find where we populated it. And without that, when we return from editing the recipe doesn’t get added to the recipes list. I’m still working on where the assignment should be made….

2012-01-09
140ERROR

Re: #48339 I placed this line of code:

editor.recipeListVC = self;
into the “addNewRecipe” block of prepareForSegue:sender in PRPRecipesListViewController.m

to ensure that the done:sender method in PRPRecipeEditorViewController had an object to call finishedEditingRecipe against.

Personally, I thought that block of code in “addNewRecipe” of PRPRecipesListViewController’s prepareForSegue:sender was not well discussed in the book, as if the end of a difficult chapter was in sight and things were getting a little rushed.

2012-01-09
2817SUGGEST

The code in the handleTweetButtonTapped: method sends the presentModalViewController:animated: message to self, but the UIViewController Class Reference notes in the “Discussion” for that method: “The presentViewController:animated:completion: method is the preferred way to present a modal view as of iOS 5.0.”

2012-01-08
13TYPO

You say to insert an empty definition between the interface and end for the handleTwitterButton but I think you meant implementation and end because your code example is for the PRPViewController.m. You could add the method declaration to the .h file as well but that is not what you are saying. Also, your example code does not show anything added to the .h file.

2011-12-29
viiTYPO

development spelled “dvelopment” at the bottom of the page

2011-12-29
8TYPO

quick help [no] the current selection are always available

should be “on”?

2011-12-29
13ERROR

Anywhere between the interface and end lines

there is no interface within the generated .m file (perhaps meant implementation )

2011-12-29
13SUGGEST

“and the authors aren’t big fans of it”

ambiguous whether it is the authors of the feature being described or the authors of the book. suggest changing to “these authors”

2012-01-08
16SUGGEST

The book doesn’t mention that you need to have an account with the apple developer program to view the documentation in this manner. If you are not a member / signed in with an apple id you get a big scary error (oh no)

2012-01-05
12TYPO

In section 1.1 “Tooling up”: actually instead of actual

(in which we develop code and user interfaces and run a build process to generate the actually apps)

2011-12-29
56ERROR

In the second paragraph of section “3.1 Blocks” the first sentence reads, “If we take a look at the TWTweetComposeViewController, we find a property called completionHandler, described as ‘the handler to call when the user is done composing the tweet’.”

It would be clearer to indicate that the reader should look in the documentation for TWTweetComposeViewController.

2012-01-08
63SUGGEST

Not a very important one, nitpicking a bit, but MVC isn’t really a design pattern. It’s a software architecture paradigm or an architectural pattern. The difference is that a design pattern is an element of something else, not the whole thing, which MVC is.

2011-12-29
65TYPO

Let’s start with a new iOS “View-Based project”

This is a little confusing as it’s not one of the options in the new project iOS section. Should it be “Single View Application”?

2011-12-29
65TYPO

“The next dialog prompts us for the superclass of the class”

This doesn’t mention that we also need to name the class in this dialog too.

2011-12-29
73SUGGEST

There is a lot of duplicate information on this page with regards to loading the view and it’s a little confusing to read. A flow chart of the steps involved in putting the view on the screen would be much easier to understand.

2012-01-09
50TYPO

Last line on the page.

…this is the part where we’re going to get in trouble with rule that UIKit.

There should be a that between the with and rule.

2011-12-29
84SUGGEST

There is no direction to enter the name “PRPRecipesListViewController” into the wizard when creating the class, yet this name is explicitly referred to later.

2012-01-09
79SUGGEST

There is no mention of how to import images into an Xcode project, nor of what the filepath is relative to. This could be handy information for complete ios noobs like me.

2012-01-09
71SUGGEST

“Next on line 6 we create our view controller” it would be better mention the line number as from “line 4 to line 6”

2011-12-29
73TYPO

“If it does not, then it looks to see if if the view controller’s nibName is specified.” there is a duplicated “if” in the sentence, should remove one.

2011-12-29
47TYPO

text in the side bar mentions NSArray but the extension is on NSString.

For example, consider that NSArray has a lastObject method, but doesn’t have one to get the first object. [myArray objectAtIndex:0] isn’t equivalent, because it throws an exception for empty arrays. With a category, we could write a safe firstObject method, by declaring a category of new methods on NSString like this:
interface NSString (MySafeMethods) -(id) firstObject; end

2012-01-05D'oh! I *meant* NSArray!
99ERROR

The reader is never directed to add preparation time values to the test data used in the list

2012-01-09
105TYPO

“[taping] on a row”

should be “tapping”

2012-01-09
113SUGGEST

The code sample on this page includes “@end”, which implies that this method should be placed just before the end of the implementation. Explicitly stating this within the page contents would help clear up where this should be positioned

2012-02-21
129ERROR

There is no instruction to “synthesize” the textView or recipe properties within the implementation

2012-02-21
65SUGGEST

The name of the class to be created is never specified (though the superclass to use is…). It is shown in “figure 24” as PRPRecipe, but never in the text.

2012-02-21
66TYPO

“Figure 24” doesn’t actually show the process of specifying the save location for the new file, as the label suggests (as well as the text on page 65).

2012-02-21
70TYPO

Unless we prefixed our classes with PRPRecipes instead of just “PRP” (on pg. 65), the names of the classes/files will not be PRPRecipesAppDelegate[.h|m] nor PRPRecipesViewController[.h|m] as the text suggests.

2012-02-21
75TYPO

redundant #1 and #3 in list?
“turn off editing, turn off horizontal scrollers, make it un-editable…”

2012-02-21
48ERROR

Line 90 from the source file is missing from the example code on the page.

[self dismissModalViewControllerAnimated:YES];

The app freezes after submitting the tweet without this line.

2012-02-21Possible you're looking at beta 1.0? We fixed this in beta 2.0 and added the following explanation: "We start with a call to [self dismissModalViewControllerAnimated: YES] on line 10. We didn’t have to explicitly dismiss the TWTweetComposeViewCon- troller before we had a custom completionHandler — heck, we couldn’t have known when to do so — but our beta readers discovered the UI becomes unresponsive if we don’t do it now (we think this might be an iOS bug and have filed it with Apple)." (beta 2, p. 48)
50SUGGEST

The connection to twitterWebView is automatically broken by deleting the webview. This might be due to a xcode update, but this was my experience. Looks like this part is no longer necessary:

“There’s also a connection that we need to break: control-click File’s Owner and in the HUD that appears, click the x button to break the connection to TwitterWebView.”

2012-02-21
140ERROR

The “recipeListVC” property does not appear to ever be set to an active instance of PRPRecipesListViewController within the chapter.

2012-02-21In the first code listing on page 141 of b2 the editor's recipesListVC is set to self. If that does not make sense please post int he forums so I can help clear it up.
145TYPO

The text says: “Control click and choose “New File…” or Command-Shift-N. However, the correct key command to create a new file is Command-N. Command-Shift-N creates a new project.

2012-02-21
145SUGGEST

The text says, “Select the DocumentRecipes group;”. This is correct for people who are using the example code, but it will appear to be a typo to readers who have been following along from the beginning, as their project and group will be called “StoryboardRecipes”.

2012-02-21
143TYPO

On page 144 of the iBooks version: ‘,’ instead of ‘.’ before ‘Even’:

These properties have a strong relationship to the objects they are connected to, Even though the superview of these items is released, the items themselves won’t be released until we also get rid of our relationship to them.

2012-02-21
156TYPO

The following sentence should end with a question mark instead of a period:

“Since users are allowed to edit the directions property, why aren’t we calling recipeChanged: when that property changes.”

2012-02-21
162TYPO

In the sendEmail: method listed on this page, the following is found: “mimeType:@”application/octet-stram“”. It appears that it should have been “application/octet-stream” instead.

2012-02-21
167SUGGEST

On this page, the following instruction is given: “First, we don’t currently have a pointer to the existing doc. Fix that by adding a new property to the PRPAppDelegate, and changing the application:didFinishLaunch- ingWithOptions: method to assign the document created there to the new property.” There isn’t a listing for this, and if the reader checks the example code, he or she will probably be surprised to find that the property has been added to the implementation file instead of the header. It would be really helpful if this was specified in either the instructions or in a listing.

2012-02-21
170TYPO

There shouldn’t be an apostrophe in the “its” in the following sentence: “We want the view controller to listen to the notifications only while it’s view is on screen.”

2012-02-21
171TYPO

“applications” should be “application’s” in the following sentence:
“First, the Key-Value Store field becomes a way to distinguish this applications cloud based key- value store”

2012-02-21
171TYPO

The last word of the following sentence should be “to”, not “too”:

“The next field, iCloud Containers, is a list of identifiers of each cloud based directory our application needs access too.”

2012-02-21
172SUGGEST

It would be helpful to warn the reader that the app will no longer run in the simulator, and will only run on a device that has iCloud configured, once the code changes listed on this page are made. I spent quite a while trying to figure this out…

2012-02-21Thanks for the erratum! It is mentioned as the second sentence of the second paragraph on page 173 in b2. Do you think it would help to move that statement to the beginning of the section?
182TYPO

In the following sentence, “representations” should be replaced with “representation”:

“To do that we’ll need a path, which is a geometric representations of a shape that we want to draw.”

2012-02-21
189TYPO

In the following part of a sentence on this page, “ran” should be replaced with “run”:

“…recall that a block is just a simple way to wrap up a bit of code
that we want ran by another object.”

2012-02-21
190TYPO

In the following sentence, “PRPRecipesListViewController” should be changed to “PRPRecipeEditorViewController”.

“Copy the code over to the PRPRecipesListViewController implementation, then add the rotation GR to the image view.”

It appears that this is simply a case of typing the wrong class name in the book text, as the correct file in the example code has the new method (Recipes_07/PRPRecipeEditorViewController.m and Recipes_08/PRPRecipeEditorViewController.m).

2012-02-21
116TYPO

The fifth paragraph should begin with “Container controllers define this interaction model …”

2012-02-21
80TYPO

The second to last sentence ends in a comma or Even should be lowercased.

These properties have a strong relationship to the objects they are connected to, Even though the superview of these items is released, the items themselves won’t be released until we also get rid of our relationship to them.

2012-02-21
84SUGGEST

The description of how to implement the PRPRecipesListViewController is a bit fuzzy. I think you mean to select Objective-C class and then then make sure it subclasses UIViewController.

2012-02-21
84SUGGEST

My last submission is an error for Xcode 4.3. it works okay in Xcode 4.2.

2012-02-21
88TYPO

Header file, PRPAppDelegate.h should have import statement (top of page)

#import “PRPRecipesListViewController.h”

2012-02-21Hi David, The @class forward declaration at the top of that listing will quiet the compiler. The import goes into the .m file, I've updated the text in the first paragraph of 'Display The Table View' to make sure to point that out. Thanks!
47TYPO

The callout on Categories talks about adding a category on NSArray but the example code and header file use NSString.

2012-02-21
26SUGGEST

last paragraph before section 2.2 Methods and Messaging. Sentence: “In this case, it means PRPApplicationDelegate handles callback methods related to the life-cycle of the application and its interaction with the system.”
Should this say “… means PRPAppDelegate handles callback …”?

2012-02-21
31SUGGEST

Since this is a sort of an iOS Programming intro chapter, the reader may not know where to place an property in a header file. At the top of page 31 in the sentence "Let’s begin by adding a property declaration to PRPViewController.h:" may want to include a mention of where to add the property to the .h file (e.g. "… after the interface ... " as is already done further down in the text on page 32 when adding the corresponding synthesize.

2012-02-21
151TYPO

“We need a couple of changes to enable editing existing apps:”

Should read:

“We need a couple of changes to enable editing existing recipes:”

2012-02-21
77SUGGEST

Although it can be derived from the programming listing, you never specifically state the name for the “PRPRecipe” class when setting up the Objective-C class in the second paragraph for the “Model Class” section. I think it would be helpful to specific state: “For the name use ‘PRPRecipe’.”

2012-02-21
89TYPO

Second line of the first full paragraph says:
Open the PRPRecipesViewController.m and go back to the viewWillAppear: method.

When it should be:
Open the PRPViewController.m and go back to the viewWillAppear: method.

2012-02-21
89TYPO

The end of the 4th full paragraph has:
Open the file PRPRecipesAppDelegate.m and select the application:didFinishLaunchingWithOptions: method.

When it should probably be:
Open the file PRPAppDelegate.m and select the application:didFinishLaunchingWithOptions: method.

2012-02-21
84SUGGEST

Under 5.2 “Create a Table View Controller”, paragraph two, the name of the UITableViewController subclass is not specified so you cannot progress through the “create new class wizard”.

The name of the class, “PRPRecipesListViewController”, can be found later - in paragraph 3 - but it seems it should be mentioned earlier.

2012-02-21
161TYPO

PRPRecipesListDataSouce should be PRPRecipesListDataSource

2012-02-21
161TYPO

PRPRecipeDocument should be PRPRecipesDocument

2012-02-21
38TYPO

In the code example for string substitution, the closing square brace for the alloc message is missing.

2012-02-21
56OK

When telling the reader to run the new version, warn the reader to quit emulator before running. Otherwise iOS tries to restore webview state and application crashes at start.

2012-02-21I tested this and didn't have a problem. If you click "Run" in Xcode and the previous version is still running in the Simulator, Xcode prompts you to stop the version in the Simulator: "“PRPFirstProjectTweeter” is already running. Click Stop to terminate and launch a new instance." Doing this was sufficient to run the UITextView version of the app, without restarting the Simulator.
74SUGGEST

In “Intentionally Breaking Things”, when telling how to restore the connection, “Control” would be preferable to “^” to specify the key to press. Although it is the symbol used when specifying key combinations, it is not the name of the key and it is not written in it.

2012-02-21
84SUGGEST

It would be easy if you mention about the class name here.

2012-02-21
73TYPO

Last paragraph on page, second sentence: “The window knows what to display by asking the rootViewController for it’s view.”

End of sentence should read: " … for its view."

2012-02-21
91SUGGEST

Figure 34 shows 7 items, but the sample code only created two. Perhaps change the description on page 86 to something like:

.. to create the array and add a few recipes:

And then the code to

recipe.image = [UIImage imageNamed:@“IMG_1948.jpg”];
[localRecipes addObject:recipe];
// feel free to add a few more recipes to fill up that table!
// …
self.recipes = localRecipes;

2012-02-21
145TYPO

In second bullet for creating the new PRPRecipesDocument class, the correct shortcut would be Command-N, not Command-Shift-N.

2012-02-21
74TYPO

The ellipsis is not being turned into the unicode char in ‘Intentionally Breaking Things’ in the VC Chapter.

Recipes[15932:207] * Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘&ellipsis;
loaded the “PRPViewController” nib but the view outlet was not set.’

2012-02-21
23OK

Text currently reads “Find
the “Round Rect Button”, and click and drag it into the gray view."

Very minor, but the element to find should be “Rounded Rect Button” not “Round Rect Button”.

2012-02-21In Xcode 4.3, the Media pane uses the term "Round Rect Button", both in list view and in the popup for icon view.
26ERROR

At the bottom of page 26 it states: “In it, we
see the template has provided trivial implementations for a lot of methods
like didReceiveMemoryWarning and viewWillAppear:.”

I followed the instructions in creating this project, but these functions were not included in the file, ‘PRPViewController.m’ that was created by Xcode.

FYI. I’m running XCode 4.3

2012-02-21Yep, that's a 4.3 change. Nice catch. There used to be more than a dozen method stubs, either with trivial implementations or just commented out.
30OK

On page 30 there is the sentence: “Let’s tease out how this code works.”

Did you mean to say “Let’s check out how this code works?” I say this because the sentences that follow this discuss Obj-C syntax.

2012-02-21http://dictionary.reference.com/browse/tease+out : "tease out: Lure out, obtain or extract with effort, as in We had a hard time teasing the wedding date out of him . This term alludes to the literal sense of tease , "untangle or release something with a pointed tool." [Mid-1900s]"
101TYPO

In the fifth paragraph on this page the second sentence should begin with a capitalised “We” or the structure of the first sentence needs to be corrected.

2012-04-05I can't find this error with the info provided.
177SUGGEST

When instructing reader to use Drawing/Recipes_start from code download, indicate that, additionally from removing iCloud code, the CoreGraphics framework has been added.

2012-04-05
211TYPO

The top of this page states “Where pointers really come into their own is when use dynamic memory management.”

“…is when use dynamic…” does not read correctly.

Possible fix: “… is when dynamic memory management is used.”

2012-04-05
50TYPO

The “Joe asks” box states “such as the custom UIView-
Controllers that that manage the behavior of one screen of our app.”

There is an extra ‘that’ in the sentence.

2012-04-05
15ERROR

Prior to Xcode 4.3, Xcode, via the Mac App Store, did install the way that was described on this page.

However, Xcode 4.3, via the Mac App Store, now installs automatically into the /Applications directory and on first run, asks if the user wishes to delete other versions of Xcode. The user no longer needs to run an “Install Xcode” file after purchasing from the Mac App Store.

2012-04-05This was addressed in beta 3.0. Looks you filed this erratum in between our bug sweep for 2.0 and the release of 3.0.
210TYPO

The sentence “This is turn changes the syntax for how we access a member…” has a typo.

The start of it should read, “This in turn”…

2012-04-05
60TYPO

There is a typo in the sentence “…that checks to see that
the result for is TWTweetComposeViewControllerResultDone and if so…”

It should read: “that the result is TWTweetComposeViewControllerResultDone and …”

2012-04-05
12,14OK

I am a new MAC user, but an experienced programmer. My new MACBook does not have keys (in keyboard shortcut references) with the markings in your book. It has the command key icon, but there is no “up arrow” on the shift key and no key has a symbol resembling “\\_”. It might be handy to have an appendix or a short summary somewhere of the icons and the keys they represent.

2012-04-05The ⌥ represents the "option" key, and is common throughout all Mac OS X applications (if you mouse through menus in Xcode, you'll see it frequently as part of a keyboard shortcut).
1385TYPO

This is Chapter 4, Section 4.1, 3rd paragraph (location 1385 as in Kindle - I am not sure if this is the same as PDF page).

There is a repetition of “can” in sentence:

“Then we can can build the view in Xcode’s Interface Builder tool.”

2012-04-05
1435TYPO

Section 4.1, Subsection Controller.

We have in the 4th paragraph:

“To get the property ”wired up" to the label, we need to connect the two in the nib file, RecipesViewController.xib."

The xib file name above should rather be PRPViewController.xib.

2012-04-05
1531TYPO

Again, there is a typo in the name of the xib file. Section 4.2, paragraph starting with “If you recall…”.

There is a sentence:

“Let’s open RecipesViewController.xib…”

It should be:

“Let’s open PRPViewController.xib…”

It seems to be a good idea to have a global search for RecipesViewControler and replace it with PRPViewController.

2012-04-05
1641TYPO

Section 4.3. Last paragraph before “Sizing Images” note.

“We are careful only replace the imageView’s image only if the recipe’s image is set.”

Sounds wrong. Maybe you meant:

“We are careful to replace the imageView’s image only if the recipe’s image is set.”

or

“We are careful only replace the imageView’s image if the recipe’s image is set.”

2012-04-05
11TYPO

line 6 - right column. 2 times “and”

…Set the size to about 220 and and the button …

-> …Set the size to about 220 and the button …

2012-04-05
87TYPO

Told to open the ‘RecipesViewController.xib’ file - should be the ‘PRPViewController.xib’

2012-04-05
75TYPO

Told to open the ‘RecipesViewController.xib’ file - should be the ‘PRPViewController.xib’

2012-04-05
68TYPO

The user is instructed to make changes to “RecipesViewContoller.xib” when the file is actually “PRPViewController.xib”. This error first appears on page 68, then 74(in the sidebar box) and again on 75. I haven’t finished the chapter yet to see how often it occurrs, but at this point it is used almost interchangably with the actual filename.

2012-04-05
65TYPO

second paragraph, end of 3rd line and beginning of 4th, “can” repeated

2012-04-05
84TYPO

Section 5.2. The book directs you to choose ““Objective-C
class” item" from the new file page and click “NEXT”. However, UITableVIewController is not an option in the drop down for that template (on the Next screen). If you choose, “UIViewController Subclass” for the template, the UITableView Controller is available to subclass.

2012-04-05You are not seeing UIViewController because you are using an old version of Xcode. 4.3 is assumed for the book.
33OK

I found that the twitterWebView loadRequest: on page 33, section 2.4 only worked if I changed “http:” to “https:”

2012-04-05I just re-tried with http: and it worked fine for me in the simulator.
8-10SUGGEST

In the first paragraph of the section titled “Introducing Interface Builder” you mention that the editor area should look like Figure 6. In Figure 6, you have already clicked the gray right arrow so that the strip is already expanded out with mini-icons and labels. Your description on page 9 would be what the user sees before they click the gray arrow. This might cause some confusion to first time users.

2012-04-05
3926TYPO

In the gray box under Staged Projects you have a work our written twice:

As we build our our sample

2012-04-05
26TYPO

In the text box titled “Staged Projects” at the top of the page, first sentence, the word :our is repeated. It should say, “As we build our sample projects …”.

2012-04-05
39TYPO

In the last paragraph on the page, second sentence, there is a missing word “in” after the word “indicated”. It should read, “… (which is indicated in the …”.

2012-04-05
47TYPO

In the text box titled “Categories”, last paragraph, first sentence, the words “a” and “just” are reversed. It should read, “… like we use in this example, is just a category …”.

2012-04-05
58ERROR

In the last paragraph on the page where you are describing what happens in lines 12-13, you say that you are using the “name” key path but the code actually has the “text” key path. I believe it should say, “On lines 12-13, we create a NSSortDescriptor that sorts on the text key path …”

2012-04-05
97SUGGEST

“For this
example, all we need to do is move the implementation of the recipes method from the PRPAppDelegate class over to this class.”. Looking at the source file from the website, the implementation changes slightly when moved over to the PRPRecipesSource class. It might be helpful to show more clearly how to move the functionality over.

2012-04-05
213TYPO

The text

‘In the storyboard, select the editing view controller and choose Edit → Embed In - Navigation Controller.’

should read

‘In the storyboard, select the editing view controller and choose Editor → Embed In - Navigation Controller.’

2012-04-05
10695ERROR

The instructions for updating PRPRecipesListViewController.m do not mention that PRPRecipe.h needs to be imported. (The import is added in the on-line source code.)

2012-04-05
113102ERROR

Should we be reminded to @synthesize the new prepTime and formatter properties in PRPViewController.m, or are we supposed to remember that by now?

2012-04-05
121110SUGGEST

Sure would be nice to be given a clue how to have both the Recipes project and the StoryboardRecipes project open in the Xcode Navigator at the same time. Even though I can do multiple project selection in the File->Open dialog, only one project at a time appears in the Navigator.

2012-04-18I don't think that is possible. \n \nI'd suggest getting out of full screen and put the two projects in different spaces.
252ERROR

Says C has “bool”. I think bool is C specific; quick googling confirms. The rest of the paragraph correctly explains null/0 == false and anything else being true, so removing that sentence should be fine.

2012-04-18
50OK

First line “actually wait (or, to be cute, it blocks on the block). ” the word “cute” shouldn’t it be “execute”?

2012-07-09No, it's "cute" in that we're making a play on words: "it blocks on the block". The first "blocks" is a transitive verb meaning "to wait until completion", the second is a noun meaning a piece of code that maintains state (the kinds of blocks we've been discussing for much of this chapter). \n \nSo… guess it wasn't so cute if you didn't get it?
113TYPO

In the first sentence on the page, the word “from” is repeated. It should say, “Control drag from the view controller …”

2012-05-02
68TYPO

The paragraph beginning ’To get the property “wired up”; refers to file RecipesViewController.xib, should be PRPViewController.xib

2012-07-06
84TYPO

“then click the Save button” should be “then click the Create button”

2012-07-06
98SUGGEST

2nd para:

“Now we have… the app. Now, when…”

Two sentences, same paragraph begin with “Now.” Eliminate or replace one of them.

2012-07-06
viiTYPO

In the changes for Beta 4, first sentence, you reference the unwritten chapter chp.publishing but isn’t that chapter 10?

2012-06-30
ixTYPO

In the last paragraph, third sentence, you reference the unwritten chapter chp.publishing. The reference needs to be fixed.

2012-06-30
xvTYPO

In the section titled “So Here’s The Plan”, each of the bullet points refer to unwritten chapters. The references to chp.tweetings, chp.programmingios, chp.concurrency, chap.viewcontrollers, chp.tableviews, chap.storyboards, chp.documents, chp.drawing, and chp.fixing need to be fixed.

2012-06-30
xviTYPO

In the bullet point at the top of the page, the reference to chp.publishing needs fixing and in the sentence right before the “Online Resources” heading, the reference to chp.neverlearnedc needs fixing.

2012-06-30
25TYPO

In the first paragraph of section 2.1, last sentence, the reference to chp.neverlearnedc needs fixing.

2012-06-30
59TYPO

In the first paragraph of section 3.5, fourth sentence, the reference to chp.neverlearnedc needs fixing.

2012-06-30
65TYPO

In the first paragraph, second sentence, the references to chp.tableviews and chp.documents need fixing

2012-06-30
132TYPO

In the third paragraph, last sentence, the reference to chp.drawing needs fixing.

2012-06-30
142TYPO

In the sentence right before the “For Further Thought…” heading, the reference to chp.documents needs fixing.

2012-06-30
181TYPO

In the last paragraph, second sentence, the reference to chp.documents needs fixing.

2012-06-30
193TYPO

In the paragraph after the code for PRPViewController.m, second sentence, the reference to chp.concurrency needs fixing.

2012-06-30
194TYPO

In the second paragraph after the code for PRPViewController, last sentence, the reference to chp.publishing needs fixing.

2012-06-30
203TYPO

In the last sentence on the page, the reference to chp.documents needs fixing.

2012-06-30
256TYPO

In the last sentence on the page, the reference to chp.programmingios needs fixing.

2012-06-30
37TYPO

In the second paragraph, last sentence, the reference to chap.viewcontrollers needs fixing.

2012-06-30
83TYPO

In the third paragraph, first sentence, the reference to chap.viewcontrollers needs fixing.

2012-07-06
100TYPO

In the first paragraph of section 5.5, second sentence, the reference to chap.viewcontrollers needs fixing.

2012-06-30
117TYPO

In the fourth paragraph, first sentence, the reference to chap.viewcontrollers needs fixing.

2012-06-30
5TYPO

I found references to chap.storyboards that need fixing on pages xv, 5, 69, 81, 89, 91, 100, 104, 145, and 192.

2012-06-30
133ERROR

In the PDF version of the book, the reference to Recipe Editor View Controller,
on page 122 shows up on page #133. In the EPUB version of the book, the same reference simply states “(as yet) unwritten content.”

2012-07-06
65TYPO

There is placeholder text at the top of page 65 that needs to be fixed. To wit: “model throughout the rest of this chapter. We’ll then display the properties of the model class in a view, and then tie the view to the model with a view controller. Later, in the (as yet) unwritten chp.tableviews, we’ll broaden our scope to present a list of recipes, and then in the (as yet) unwritten chp.documents we’ll look at how to store our recipe model on disk so it persists from run to run.”

In particular the reference to chp.tableviews and chp.documents. And the phrase “in the (as yet) unwritten”.

Hope this helps!

2012-06-30
69TYPO

You should search the entire book for the phrase “in the (as yet) unwritten”. There are quite a few of these references to fix up in the B5.0 PDF file. The most recent one I discovered is on page 69. Hope this helps!

2012-06-30
80TYPO

Typo in the following sentence:

“Yes, the container view, the one the view controller is connected to via is view property in Interface Builder, is indeed released.”

It should read:

“Yes, the container view, the one the view controller is connected to via its view property in Interface Builder, is indeed released.”

That’s a bit awkward… perhaps:

“Yes, the view that contains our title, description, and image gets released. This is the view connected to our view controller’s view property.”

Hope this helps!

2012-07-06
98SUGGEST

On page 98, you have the sentence: “What we have so far is sufficient, but only: we can see the list of recipes, but the rows are not very compelling visually.”

The “but only” is awkward. I would suggest changing it to:

“What we have so far is sufficient, but just barely: we can see the list of recipes, but the rows are not very compelling visually.”

or

“What we have so far is sufficient, but the rows of our recipes list are not visually compelling.”

With respect to the word “very” in the original sentence, Mark Twain once said: “Every time you want to use the word ”very“, use the word ”damn" instead. Your editor will delete the word “damn” and your writing will be as it should." :-)

2012-07-06
112TYPO

The 5th para on page 112 reads:
First, place the “Done” in the top right, click control and drag to the view controller, and connect the button to the dismiss: method.

I think it should be: First, place the “Done” button in the top right, control-click and drag from the “Done” button to the view controller, and connect it to the dismiss: method.

2012-07-06
69TYPO

The sentence in the second to last paragraph, “we could do it when the view controller is deserialzed from the nib…”, should be “we could do it when the view controller is deserialized from the nib..” (“deserialized” spelled incorrectly).

2012-07-06
72TYPO

In second to last paragraph, the reference to “RecipesViewController.xib” should be “PRPViewController.xib”.

2012-07-06
74TYPO

In the third paragraph of the “Intentionally Breaking Things” section, the reference to “RecipesViewController.xib” should be “PRPViewController.xib”.

2012-07-06
75TYPO

In the second paragraph, the reference to “RecipesViewController.xib” should be “PRPViewController.xib”.

2012-07-06
78ERROR

The sample code section is split by Figure 32 and the “Sizing Images” section, making it hard to read the code.

2012-07-06
99TYPO

In the second paragraph, add a space between “anyplace”.

2012-07-06
102TYPO

The beginning of the second line in the second paragraph needs to be capitalized.

2012-07-06
107TYPO

In the second sentence of the last paragraph, “left most” should be “leftmost”.

2012-07-06
121ERROR

When using ARC, IBOutlet properties which are subviews of the view controller’s view should be defined as weak rather than strong references (since they are retained by the controllers view as subviews). If you do this, the references automagically get nilled when the view gets unloaded, hence you can often completely dispense with your implementation of viewDidUnload.

2012-07-06
171TYPO

“we need to copy it’s recipes into our existing
document.”In this sentence, “it’s” should be “its” since the context requires a possessive rather than the contraction for “it is”

2012-07-06
342SUGGEST

ajsfhjsjfh

2012-06-25
allSUGGEST

I’m working through the chapters and used all file types. But all the graphics are of low quality in my opinion. If I open the epub on my retina iPhone 4s, the example Xcode screenshots are small, that’s ok, because of the screen, but when i zoom in to look in detail, the images are of low resolution, not what i aspected in these days…

On the other hand when i use the Kindle reader om my 21.5" iMac, I still can’t see clearly the details on the screenshots.

I would love to see more detailed graphics in the final release. :-)

Good luck, and hope that my comments are of use.

Best regards,

Sander Hopman.

2012-07-06
11499ERROR

Lines 14-16 do not refer to the dataSource for recipe properties; they still use the previous recipe code.

2012-07-06
126111SUGGEST

I think it would be a good idea to offer a reminder or advice to #import the header files for PRPRecipesListViewController and PRPRecipesSource when making changes to the PRPAppDelegate.

2012-07-06
95TYPO

Paragraph that reads “We have one more table view delegate method to update.” Next sentence is “Got to tableView:cellForRowAtIndexPath:”. “Got to” should be “Go to”.

2012-07-06
132ERROR

This is actually in the epub version delivered to my Kindle, but the content is on page 132 of the PDF. In the epub, in the 2nd to last paragraph that reads “…rather than the rootViewController of the window”, the monospace formatting that begins with “rootViewController” in that paragraph continues on through the next paragraph. The text formatting goes back to normal after “topViewController” in the next paragraph.

2012-07-06
65TYPO

In the second paragraph, fourth sentence, you have repeated the word “can”. It should say, “Then we can build the view in Xcode’s Interface Builder tool …”.

2012-09-27
40TYPO

In the colored box, final paragraph, there’s “Thankfully, ith ARC”, which would seem to be intended to be “Thankfully, with ARC”.

2012-09-27
241TYPO

Second screenshot resolution for landscape orientation should be 960 x 640, not 960 x 940.

2012-09-27
5940TYPO

In Joe asks, final paragraph “Thankfully, ith ARC, this…” should be “… with ARC …”

2012-09-27
42TYPO

You tell us to tap the button “J’ai terminé le projet”, when you instructed us on page 41 to label it “J’ai fini le projet”.

2012-09-27
78TYPO

Not in the book itself, but in the hosted code example, there’s a weird  character next to “bake at 350”.

2012-09-27
92TYPO

“On line 6, we tell the table view to delete the row…” I think the code in question starts on Line 5 (and is completed on line 6).

2012-09-27
45ERROR

4.5 inch screen is referenced instead of 4 inch screen

2012-09-27
150SUGGEST

You give the code for the loadFromContents:ofType:error: method. In the subsequent explanation of the code you talk about line 5 and 7, but not line 6.

It might be nice to explain that line 6 is casting and renaming the contents argument, so that unarchiveWithData is passed the right type. I suspected this was the case, but was unsure until I asked a friend. :)

2012-09-27
32TYPO

In the last sentence of Section 2.2, canSendTweet is mentioned as the selector that defines the message. canSendTweet is not present in the code snippet; it appears that isAvailableForServiceType should go here instead.

2012-09-27
32TYPO

“The square braces indicate that we’re sending an Obj-C message, with the SLComposeViewController class as the target that receives the message and canSendTweet as the selector that defines the message.”

I believe that isAvailableForServiceType: is the selector not canSendTweet.

2012-09-27
156SUGGEST

We are implementing our second protocol, PRPRecipeEditorDelegate. The hands-off approach is nice, we should know by now how to make a protocol.

However the first line is @class PRPRecipe;. We haven’t used that syntax before, and it’s not in the other protocol. It would be great if you explained what that line means.

2012-09-27
167SUGGEST

“Now that we have both directories visible, drag the Recipes.recipes into the Sites directory. Make sure to hold down the Option key as you drag so that the file is copied instead of moved.”

I moved the file, because I read the first sentence first. I suggest changing it to something like

“Now that we have both directories visible, hold down the Option key and drag Recipes.recipes into the Sites directory.”

2012-09-27
174ERROR

In the latest version of xcode (Version 4.5 (4G182)) and/or iOS 6, enabling iCloud also involves ticking the “Enable iCloud” box, and adding your own ubiquity container.

2012-09-27
62SUGGEST

In the 3rd paragraph (under the code block) you mention that you didn’t know you needed to dismiss the SLComposeViewController. This might now have been added to the documentation. In the SLComposeViewController documentation under Constants > SLComposeViewControllerCompletionHandler, it says “The completion handler is called while the SLComposeViewController is still visible and it is responsible for dismissing the view controller.”

This is Xcode 4.5 (4G182) and was correct as of the posting of this erratum.

2012-10-01Ah, interesting. Guess it's not a bug then, thanks!
275TYPO

3-lines from the bottom of the page, I believe you should refer to selecting the Objective-C class at this step, not the UIViewController subclass (which is selected on the next page).

2012-10-01
278ERROR

shouldAutorotateToInterfaceOrientation has been deprecated in iOS6.

2012-10-01
287SUGGEST

Should mention that we need to import PRPRecipe.h

2012-10-01
315SUGGEST

Xcode 4.5 code completion generates “aCoder” for encodeWithCoder and “aDecoder” for initWithCoder

2012-10-01
312SUGGEST

For the complete StoryboardRecipies as well as your DocumentRecipies starter code. If I run either code on the iPhone 5 or simulator, stop the app from Xcode then restart, it is true that the recipe(s) I added disappear. However, if I run the app from either the physical phone or simulator then press the home button, then relaunch the app from the device or simulator, the added recipes will reappear. There appears to be automatic persistence. It would be helpful to explain what is going on along with how to eliminate this behavior.

2012-10-01
163OK

Xcode 4.5: Starting with the “DocumentRecipies_start” code and then working through page 170, up to Refine the Document: If you run the code from the DocumentRecipies_start folder, the app will crash when attempting to insert a new recipe into the recipes list. If you rename the folder to “DocumentRecipies” it will behave correctly. I tried replacing all of my files with the DocumentRecipies_01 files and it still crashed if the main folder is titled “DocumentRecipies_start”.

2013-07-29Unable to replicate, sorry.
178ERROR

In the middle of the page: “Tap the Add button on the bottom right…” should be “Tap the Add button on the bottom left…” It is located there in Xcode 4.5.1. The same statement appears on following pages.

2013-07-26
82TYPO

The penultimate word in the last sentence of the first paragraph should be twitterTextView not twitterWebView.

2013-07-26
80TYPO

The second sentence of the first paragraph in section “3.3 Concurrency and UIKit” ends with “call them” (referring to UIKit properties). Wouldn’t it be more accurate to say “reference them” instead?

2013-07-26
19ERROR

Second paragraph, it says that the class name that contains the “SLServiceTwitter” constant is “SLServiceRequest”, but the class name shown in the actual iOS 6.0 documentation is called “SLRequest”. The next paragraph correctly states the name of the class as “SLRequest”.

2013-07-26
32ERROR

The square braces indicate that we’re sending an Obj-C message, with the SLComposeViewController class as the target that receives the message and canSendTweet as the selector that defines the message.
Wrong: canSendTweet
Correct: isAvailableForServiceType

2013-07-26
97ERROR

There is a reference to an image on page 98, but there is no image on page 98, just the image subscript.

2013-07-26
73TYPO

Noticed on the Readmill version of the book, in the code listing for Programming/PRPFirstProjectTweeter02/PRPFirstProjectTweeter/PRPViewController.m, in the handleShowMyTweetsTapped method, the url listed is “www.twitter.com/pragprog”, but on the next page it says “obviously, the yourtwittername in the URL string should be replaced by an actual Twitter handle.” “yourtwittername” doesn’t actually appear in the code listing.

2013-07-26Duplicate of #50173 (actually, this one was filed first… either way, both are fixed)
159TYPO

Figure 62 appears to be missing

2013-07-26
87ERROR

In 4.1 Practicing MVC.
I think you need to add:
#import “PRPRecipe.h”
at the top of PRPViewController.h so the property can resolve the reference to PRPRecipe

2013-07-26
31OK

if the object isnil, nothing

-> is_space_nil_

2013-07-26There is a space there, you're just seeing the italics on "is" leaning too far into the monospaced "nil". We'll see what we can do to prettify this layout problem.
3535TYPO

The text says there’s a string “yourtwittername” in the shown URL, but there’s no such string, the example URL is “twitter.com/pragprog”, not “twitter.com/yourtwittername”

2013-07-26
139OK

On line 5 in the first text block there is a space missing at the end of the line between title and property

2013-07-26There is a space there in the source, it's just getting lost in the styling.
142TYPO

In line 4 in the first text block I think it should read: “that THE textViewDidEndEditing: method is called before the recipe editor IS displayed.”

2013-07-26
141SUGGEST

In the second last block of text on this page, you mention, that the view will be in a navigation controller. So I would expect to find the pattern of “creating another navigation view controller as a wrapper” to be repeated as it was in the creation of the recipe editor view. Why is there no additional navigation view controller wrapped around the directions view controller this time?

I think, a short explanation about that would help people from accidentally wrapping in another navigation controller or expecting to find that direction somewhere later in the text.

2013-07-29We'll be taking a different approach to navigation controllers in the next edition… may be easier to see what's going on when we go storyboards-only.
60ERROR

In the code block, dismissing the tweet view controller (Line #11) is dependent on the user clicking ‘Send’. When clicking ‘Cancel’, the view controller isn’t dismissed.

Moving the dismiss code out of the ‘if’ statement will dismiss the view controller in either case – as in:

[self dismissViewControllerAnimated:YES completion:NULL];
if (SLComposeViewControllerResultDone == result) {
[self reloadTweets];
}

2013-07-26
66ERROR

The implementation of handleTwitterData:urlResponse:error: doesn’t clear the contents of twitterTextView before generating it anew. If the “Show my tweets” button is pressed before tweeting, the new tweet won’t be displayed at the top, but rather in the middle.

2013-07-26
158ERROR

When adding the ‘recipes’ property to the new PRPRecipeDocument class, the book fails to note that the property getter should be copied from PRPRecipesSource (or implemented) in order to create the ‘recipes’ array lazily. Failing to implement that property getter will result in the following error when updating the table view: ‘attempt to insert row 0 into section 0, but there are only 0 rows in section 0 after the update.’

2013-07-26
160SUGGEST

In the second paragraph it says: “We need to ensure that we have an array ready in which to store recipes when the document is created, so let’s override the initWithFileURL: method.” However, it isn’t immediately obvious how the code sample accomplishes this.

It looks like the code sample tests for the existence of a document file on disk and, if not present, saves the document to disk. The side-effect of this is that the reference to the ‘recipes’ property in contentsForType:error: will create that array.

I would suggest a more in-depth explanation of what happens in that method (for a newbie like me, it looks a lot like black magic), as it’s done so excellent in most other code samples. For instance, how does the array get initialized if the file actually exists? Is loading the document content from the file implicit in the call to [super initWithFileURL:url]?

2013-07-29
162ERROR

In the section “Refine the Document” it says: “If you delete the app from the simulator and then rerun it from Xcode, you’ll notice that our document fails to open.”

This is no longer true, because of the initWithFileURL: method inserted on page 160, which proactively creates the document on disk, if it doesn’t exist when the document is initialized.

The handleError:userInteractionPermitted: method is not called with an NSFileReadNoSuchFileError, even when deleting the application (and it’s document) from the simulator before running the application.

2013-07-26
88TYPO

Minor typo: page 88 in ePub first line the URL in the code is “pragprog” twitter handle but text refers “yourtwittername”.

2013-07-26
151TYPO

When the property recipeListVC is added to the headerfile PRPRecipeEditorViewController.h the next sentence says:

In the implementation file, we need to import PRPRecipesListViewController.h.

Don’t you mean the header file?

regards
Claus

2013-07-26
172160ERROR

PRPRecipesDocument.m is missing “recipes” property initialization for those following along writing their own code. The book says on page 160, paragraph 2, “We need to ensure that we have an array ready in which to store recipes when the document is created, so let’s override the initWithFileURL: method.” However, the initWithFileURL method doesn’t create the array which causes an error when trying to save a new recipe in the simulator.

Perhaps the sample code for PRPRecipesDocument.m should include a line to initialize the recipes property, e.g. “self.recipes = [NSMutableArray array]” in the ’if (self) {}" block.

2013-07-26Same underlying problem as #50203
84OK

Potential gotcha: the order matters here. If you aren’t paying attention and put line 9 in the wrong place (like I did), say, at line 5 ahead of the creation of the viewController, the app will launch but the title will be blank. Worse, though, is that the failure is silent; it won’t perform as expected, but it’s hard to figure out why. I had to use a series of NSLog statements tracing the setting of recipeTitle, etc. to see why the values that were being passed around were (null).

2013-07-26That probably wasn't any fun to track down, but I'm not sure there's an appropriate change to make to the text here. If you tried to set the viewController's recipe property before the viewController exists, it does make sense that it wouldn't work. The difference is that in Objective-C, this is a silent error (you're messaging nil), whereas other languages might blow up with a NullPointerException or something. \n \nMaybe we need to make a bigger point back in chapter 2 that while it's convenient to not crash when you message nil, it can also be the source of debugging frustration. \n \n
106OK

Text refers to IMG_1948.jpg and code refers to cookie.jpg. Also, it may be helpful to show how to import the image into the project.

2013-07-26Adding images to the project was addressed in the previous paragraph, which begins "The downloadable sample code has an image…". You'll find the information you need starting with the sentence "To add an image file to Xcode, you can drag it from the Finder to the project navigator."
25OK

In the 4’th item for thought, second sentence, there is a space missing between “perhaps” and “handleFacebookButtonTapped:”.

2013-07-26There's a space there in the book's source; possibly a styling/layout thing for production to look at.
46OK

In the third paragraph, second sentence, there should be a space between “x-y” and “origin”.

2013-07-26There is a space there, you're just seeing the italics on "x-y" leaning too far into the monospaced "origin". We'll see what we can do to prettify this layout problem.
64TYPO

At the end of the second paragraph, you mention that the full class extension for PRPViewController contains the twitterWebView property when it should say that it contains the twitterTextView property.

2013-07-26
89SUGGEST

Below figure 36, probably after you talk about sizing the image view for the cookies, you might want to talk about updating the view constraints to accommodate the two iPhone sizes.

2013-07-26
98TYPO

In the second paragraph, first sentence the hyphenation for PRPAppDelegate.m looks odd. I would think the hyphen should be between PRP and AppDelegate.m or between PRPApp and Delegate.m.

2013-07-29
156OK

In the last paragraph, first sentence, there should be a space between “super” and “init”.

2013-07-26There's a space there, but the styling is crunching the words closer together in the PDF than they should be.
28ERROR

“By default, protocol methods are optional, but they can be made mandatory” should state the opposite:

“By default, protocol methods are mandatory, but they can be made optional”

2013-07-26
6449TYPO

“To get the NSString to behave as a normal, immutable
string, we copy it into a plain NSString at assign-time.” — should be
“To get the NSMutableString to behave as a normal, immutable
string, we copy it into a plain NSString at assign-time.”

2013-07-26
225OK

My test script kept failing at the step where it was supposed to click the prep time stepper. With the keyboard on the screen, it couldn’t find the Increment button to push it.

By adding this line right below the line that set the recipe title, I was able to dismiss the keyboard and have the script finish successfully:

target.frontMostApp().keyboard().elements()[“Return”].tap();

Perhaps this should be added in to the book’s code?

2013-07-29Try adding a script, and pasting in "Create new recipe UIA test.js" from the download code. This works for me with the download example, without having to hit return on the keyboard. Possible that the way your UI is laid out has the buttons under the keyboard?
98ERROR

I have no idea what is meant by “Import the PRPRecipe.h filename and…” in the middle of the page. Assuming we continue from chapter 4, I already have a PRPRecipe.h file. What’s more the very next code sample refers to the code in PRPAppDelegate.m. But then on the next page, there’s only 7 lines for this code file, and it doesn’t include the samples from the previous page. I’m a bit lost!

2013-07-26
63SUGGEST

The text reads “drag a UITextView from the Object library”. In my version of XCode (Version 4.6.2 (4H1003)), this is just called a “TextView” in the Object library but after dragging it, the label reads UITextView. This might be worth clarifying as I spend some time looking for one called UITextView…

2013-07-26
105SUGGEST

I encountered a possible erratum in the forward declaration of PRPRecipe. I’m hand coding the app myself because I find I remember more when I code everything myself. This issue is with the forward declaration of PRPRecipe in PRPRecipesListDataSource, I had to import the header instead because I was getting an build error in PRPRecipesListViewController.m when trying to call the ‘title’ accessor on ‘self.dataSource’. The code has since been refactored because I’ve worked my way along through the book but if I change back to a forward declaration of PRPRecipe I still get the error. You can view my code on GitHub at
jgoodell the project name is iOS-recipe-app.

Thanks,
Jason

2013-07-29
262ERROR

The book states “given int foo[], we can get the tenth member as either foo[9] or *(foo + (9 * sizeof(int))).” That’s untrue.

In C, array indexing is formally defined in terms of pointer arithmetic; that is, the language specification requires that array[i] be equivalent to *(array + i). <[wikipedia]/Pointer_(computer_programming)#C_arrays>

Here’s a short program to demonstrate:

#include <stdio.h>

int main() {
int i;
int foo[10*sizeof(int)];

for (i = 0; i < 10*sizeof(int); ++i)
foo[i] = i;
printf(“foo[9] = %d\
”, foo[9]);
printf(“*(foo + 9) = %d\
”, *(foo + 9));
printf(“*(foo + (9 * sizeof(int))) = %d\
”, *(foo + (9 * sizeof(int))));
return 0;
}

On an Intel Mac, where int is 4 bytes, this program outputs the following:

foo[9] = 9
*(foo + 9) = 9
*(foo + (9 * sizeof(int))) = 36

2013-07-26
162149ERROR

When I run the app and bring up the UIImagePickerController, I just get a black screen and a grey header at the top. I’ve gone through the section again to make sure I haven’t missed anything. Perhaps it’s to do with the fact that I’m now using XCode 5?

Categories: