Errata

Learning iOS Programming

Errata for Learning iOS Programming

Submit your own errata for this product.

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

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

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
PDF Page NA
NA

The "Prototype2" folder code does not open and run when the folder is opened because Prototype.xcodeproj AND Prototype2.xcodeproj are in the SAME folder.

When I opened the app by doubleclicking on Prototype2.xcodeproj it worked. It also worked when I removed Prototype.xcodeproj from the same folder.

Roy Wagner  Jul 21, 2013 
PDF Page NA
NA

The Reachability file reports a warning message:

declaration of 'struct sockaddr_in*' will not be visible outside of this function

Add #import <netinet/in.h> in Reachability.h to get rid of this warning.

Roy Wagner  Jul 21, 2013 
PDF Page 56
1st paragraph

On page 55 the code example is given like this:

UILabel * label;

but in the following text, the 'label' object is called 'anObject' and the class is given as 'SomeClass'.

SnakeNuts  Mar 17, 2013 
PDF Page 67
Code example below 3rd paragraph

In the interface declaration, the '<' and '> characters are faultily represented with & lt; and & gt; (I've put spaces in the text here to prevent any HTML renderer to replace them)

SnakeNuts  Mar 18, 2013 
Mobi Page 78
Kindle Location 1549, Code sample at top of of page - starts with "- (void)tableView:(UITableView *)tv didSelectRowAtIndexPath"

MOBI format in Kindle app on both iPad and Mac loses the space between "tv" and "didSelectRowAtIndexPath" causing an error in the line.

Here's a copy/paste from the Mac Kindle app:

- (void) tableView:( UITableView *) tvdidSelectRowAtIndexPath:( NSIndexPath *) indexPath { [tv deselectRowAtIndexPath:indexPath animated:YES];

Alasdair Allan. Learning iOS Programming (Kindle Locations 1548-1550). O?Reilly Media.

Maymount  Apr 10, 2013 
PDF Page 89 and 162
First paragraph

Pages 89 and 162 (printed page number in the PDF) both refer to RootController.m, but there are no other references to that file. I assume this is a reference to GCViewController.m that got missed in a global search/replace.

Maymount  Apr 11, 2013 
PDF Page 90 & 269
Last few paragraphs

References are made to "CGAppDelegate.m" which does not exist in these apps.

It's a "Minor" mistake if you can figure out what file it actually means.

A reference to "GAppDelegate.m" is made on page 270; this being a typo.

Roy Wagner  Aug 22, 2013 
PDF Page 93
Near bottom

Code doesn't work.
[delegate.navController pushViewController:city animated:YES];

It seems to be connected with ARC mechanism in iOS.

Note from the Author or Editor:
Actually a change in the way view controllers are handled. Will be update in next editon.

Piotr Sochalewski  Jul 28, 2013 
ePub Page 115
1st Paragraph

(How does one provide a page number for an ePub with variable page numbering based on font?)

Mocking Up Functionality with Alert Windows (Paragraph)

Should not "Go back to RootController.m..." be "Go back to CGViewController.m"?

Roy Wagner  Jun 13, 2013 
PDF Page 120 vs 103
Bottom of each page and the next

There code text difference shown initially on PDF page 103 (87) versus 120 (104).

Difficult to know what works, what to keep, and what to change.


Roy Wagner  Jun 16, 2013 
PDF Page 127
2nd Paragraph

The final sentence of the 2nd paragraph says "along wit the iPad-only Popover controller". Should be "with".

Anonymous  Aug 21, 2013 
PDF Page 144
Code block at bottom of page

In the block of code added to the TEAppDelegate.m for the didFinishLaunchingWithOptions there is a error in the code marked with the 1. The line appears as:

self.tabBarController.viewControllers =
self.tabBarController.viewControllers =
@[viewController1, viewController2, viewController3];

The second "self.tabBarController.viewControllers =" is redundant.

Anonymous  Aug 22, 2013 
PDF Page 173
2nd block of code

In the implementation of the didFinishPickingMediaWithInfo the first line of the implementation is:

[[self dismissViewControllerAnimated:YES completion:nil];

There is an extra [ at the beginning of that line that should not be there.

Anonymous  Aug 26, 2013 
Printed, PDF Page 174
Last two paragraphs

These paragraphs mention that there is a subtle bug in the CityGuide3 application relating to the city textfield losing its text after using the image picker. Yet deploying and testing on an iPhone 5 with 6.1.4 and following the steps that supposedly show the bug the bug does not represent itself. The text still remains in the city textfield even after returning from the picker. Is this perhaps an issue that has been fixed within iOS since the writing of the book?

Anonymous  Aug 27, 2013 
PDF Page 189(173)
Near bottom

Is there a reason that newCity.cityPicture is set to nil and then to cityPicture?

newCity.cityPicture = nil;
newCity.cityPicture = cityPicture;

Roy Wagner  Jun 25, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version Page 190
First paragraph

This is an update about the Figure 7-3 errors screenshot. The latest version of the Reachability example from Apple has been updated on 2013-08-17 to use both ARC and Storyboards so the compilation errors no longer happen.

Anonymous  Aug 27, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version Page 192
2nd code block

In reference to the previous mention of how the Reachability example has been updated for ARC this means that the code line:

Reachability *reach = [[Reachability reachabilityWithHostName: @"www.apple.com"] retain];

throws a compilation error that "ARC forbids explicit message send of 'retain'".

Anonymous  Aug 27, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version Page 218
First code block under Asynchronous Requests header

The second line in the code block:

NSURL *url = [[NSURL URLWithString:string] retain];

throws a compiler error that "ARC forbids explicit message send of 'retain'".

Anonymous  Aug 28, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version Page 234
Code block at top

The format string in the NSLog statement for the centigrade, fahrenheit, humidity and wind speed are all:

@"condition = %@"

instead of the correct variable.

Anonymous  Aug 29, 2013 
Printed, PDF, ePub, Mobi, , Other Digital Version Page 252
2nd code block

The example using the TwitterTrends class no longer works because Twitter has deprecated the 1.0 API. This means you will get a 410 error code back when running the example. The example needs to be updated to the 1.1 version of the Twitter API.

Anonymous  Sep 05, 2013 
ePub Page 270
Middle of page

The file name should be "CGAppDelegate.m" instead of "GAppDelegate.m".

Anonymous  Sep 06, 2013