By Developers, For Developers

Historical errata for iOS 8 SDK Development

PDF PgPaper PgTypeDescriptionFixed onComments
15TYPO

Last paragraph.
“The eye icon only appears when the Playground knows that the object its evaluated has a graphic representation.”
“its evaluated” to be replaced by “it has evaluated” or “it’s evaluated”

2014-10-04
16TYPO

Missing verb in last sentence of page.
“Here’s what that looks like if we the buttons for ….”

How about ?
“if we click on the buttons…”

2014-10-04
9SUGGEST

“…and a variety
of tools for making apps look and work well on both iPhone and iPad.” s/b “…and a variety
of tools for making apps look good and work well on both iPhone and iPad.”

2014-09-23Just wanted to leave a comment on this first erratum of beta 1 to thank everyone who's sending in errata. Thank you thread at: https://forums.pragprog.com/forums/324/topics/12987
18SUGGEST

Middle of page: “Swift lets us build strings from smaller parts, and uses the sequence \\() to say “evaluate what’s inside the parentheses, and insert that into the string“.”

Should probably have something inside the parens, like [expr] or the like, then “evaluate [expr] inside the parentheses…”

2014-10-04
18TYPO

3rd graf of “My First Computer”: “Inevitably, computers got
away writing programs as being the primary user experience…”

word missing? “got away from”?

2014-10-04
19TYPO

redundancy: “The ability for apps to send tweets from apps….”

2014-10-04
30TYPO

End of first paragraph.
“The initial storyboard is shown looks like the following figure.”

Insert “that” in between “storyboard” and “is shown…”

2014-10-04
23TYPO

Paragraph on Align popover.
“constraints that align a views edges… ”

Put the possessive ’s on view as in
"that align a view’s edges

2014-10-04
23TYPO

Align popover paragraph.
Coordinate the plural used in the first verb, “align” with the last one “centers”.
I am assuming the subject of both verbs is the plural constraints.

2014-10-04
34TYPO

Me bad! The last two issues that I had attributed to page 23 are actually page 34 on PDF. (got mixed up on where to look, top of page page number or PDF page number on top of window).
Sorry about the error, … twice….

2014-10-04
40ERROR

The description of filling out the popover for the connection is missing the step to actually click the “Connect” button.

2014-10-04
42ERROR

“In PRPViewController.m…” looks like an Objective C reference. Should presumably refer to ViewController.swift.

2014-10-04
40SUGGEST

Add a line to say to click on Connect button inside the popover before returning to standard editor, and dismissing the assistant editor?

2014-10-04
45ERROR

Near top of page: “Try clicking the button; it likely shows an error alert saying that no Twitter accounts have been configured, with buttons offering to take you
to Settings or to cancel.” It does not do that. But it does give the “Can’t send tweet.” message in the console.

2014-11-23
45TYPO

“Edit the text if desired and then click Send.” s/b “…click Post.”

2014-10-04
49TYPO

“The idea is that the UIAppDelegate protocol describes methods that…” I think it s/b UIApplicationDelegate.

2014-10-04
52-53ERROR

“Then click the “Pin” button and add a constraint pinning the distance to the “Top Layout Guide” as 0, which should be…."

I’m not seeing “Top Layout Guide” as an option. The default is “View”.

2014-11-23Yep, all the pinning distances changed at the last second in Xcode 6.0, adding a concept of a "margin" that we hadn't previously seen in the early Xcode betas, and replacing that "top layout guide" for new projects. \n \nWe're going to have to back and rebuild all the projects from scratch to get them to actually match exactly what Xcode gives you, but this will probably wait until Xcode 6.1 and Yosemite are out, so it might be one or two more book betas until all these get fixed. Thanks.
53-54ERROR

Setting the constraints for the UIWebView does not seem to work as described and shown. When I make the UIWebView full width, the Pin button shows me to be –16 from the left and –16 from the right, not 0, 0 as printed. If I make the values 0,0, then the UIWebView does not touch the left and right sides of the container.

2014-11-23See comment above on #77380
70OK

“The Swift language, along with the Foundation and UIKit frameworks, do
their part to support internationalization….” s/b “does” instead of “do”

2014-10-05Leaving this for the copy editor… debatable whether the "along with" phrase makes the entire group of language + Foundation + UIKit a plural subject. That was my intent. Leaving this for the copy-editor to make a judgement call.
60-61ERROR

When looking at Localizations, the text says that just one file (Main.storyboard) will have localizations, but in fact the project also shows LaunchScreen.xib as having localizations.

2014-11-23LaunchScreen.xib is another new thing they surprised us with in the GM version of Xcode 6 (notice that the file doesn't appear in any of the screenshots or sample code, which were created with the Xcode 6 betas). At some point, we'll do a beta of the book that rebuilds all the projects from scratch, and that'll include LaunchScreen.xib. We'll keep this erratum open until then, so we know we have text to fix too. —Chris
72ERROR

“Select Storyboard.main and switch to the Assistant Editor.” s/b Main.storyboard.

2014-10-04
73ERROR

“In ViewController.swift, replace the line that assigns tweetVC.message with the following:” should refer instead to the setInitialText method on tweetVC.

2014-10-04
80ERROR

“Click on the PragmaticTweetsTests file in either the Project or the Test Navigator.” s/b “the PragmaticTweetsTests.swift file….”

2014-10-04
16TYPO

Actual: “Here’s what that looks like if we the buttons for each myLabel, from top to bottom:”

Expected: “Here’s what that looks like if we select the buttons for each myLabel, from top to bottom:”

2014-10-04
40TYPO

Actual: ‘In this case, there’s one connection shown in the “Sent Actions” section’

Expected: ‘In this case, there’s one connection shown in the “Sent Events” section’

2014-10-04
42TYPO

Actual; “Armed with this class, we’re ready to lay down some code. In
PRPViewController.m, rewrite the handleTweetButtonTapped()”

Expected: “Armed with this class, we’re ready to lay down some code. In
ViewController.swift, rewrite the handleTweetButtonTapped()”

2014-10-04
49TYPO

Actual: “The line ends an open curly-brace; any functions and properties between this and the
matching closing curly-brace are part of the class.”

Expected: "The line ends with an open curly-brace; any functions and properties between this and the matching closing curly-brace are part of the class.

2014-10-04
49TYPO

Actual: " The idea is that the UIAppDelegate protocol"

Expected: " The idea is that the UIApplicationDelegate protocol"

2014-10-04
83ERROR

Inaccuracies for creating the new test file. It’s not File -> New File, it’s File -> New -> File. There is no XCTest to subclass, it’s XCTestCase.

2014-10-04
84TYPO

“Swift considers all the classes in the PragmaticTweets to be one module….” There is a missing word after PragmaticTweets. Perhaps “folder” or “target”?

2014-10-04
84ERROR

“Start in WebViewTests.swift by adding an import statement….” refers to a non-existent file. I think maybe it s/b PragmaticTweetsTest.swift…?

2014-10-04
84ERROR

Disregard erratum #77399. I made a mistake in where I saved WebViewTests.swift.

2014-10-04
87TYPO

When we create the new reloadTweets method, the “sender” parameter suddenly disappers. It should remain.

2014-11-23
83TYPO

Actual: “Make sure this class is a subclass of XCTest”

Expected: “Make sure this class is a subclass of XCTestCase”

2014-10-04
85TYPO

Actual: “So put a public modifier right or after”

Expected: “So put a public modifier right before or after”

2014-10-04
98TYPO

In the code to establish cellForRowAtIndexPath `cell.textLabel.text = “Row \\(index.Path.row)”` it seems that cell.textLabel should be unwrapped with the ! modifier.

2014-10-05
49TYPO

Missing “t” in extensions in last sentence for the chapter 13 reference.

“Chapter 13, Launching, Backgrounding, and Exensions, …”

2014-10-04
89TYPO

very bottom of the page, a semicolon snuck in: self.loadedWebViewExpectation!.fulfill();

2014-10-04
87OK

“Now, add the line self.reloadTweets() to the viewDidLoad() method.” Since this piece of code is inline in the text, it doesn’t stand out as a line to actually add to the program. Consequently, I missed it, and didn’t find it until my test failed. Might be good to make it consistent with other code snippets.

2014-11-24We looked at doing this, but found it could also be confusing to show the whole viewDidLoad() method, which already exists, and then try to show the one new line in that context. Since the sentence starts "Now, add the line…", we're going to count on our smart readers to pick up on that.
28SUGGEST

“Well, there’s a big round Run button,”
The Run button in Xcode 6 is not round anymore.

2014-10-04
62TYPO

Same as Issue #77425, about the “t” in Exensions in the title of the chapter reference

2014-10-04
39TYPO

The PDF says “in Chapter 13, Launching, Backgrounding, and Exensions, on page 219”, should be Extensions?

2014-10-04
107TYPO

Second full paragraph on the page references a PRPViewController class, instead of just ViewController

2014-10-05
267ERROR

Bug with app: Modal UserDetail does not dismiss when selecting “Done” after code has been reworked to work as a split view.

2014-11-23Fixed for beta 3. Turns out that exit segues need to have a navigation controller somewhere before the unwinded-to VC, even if the original segue was a modal (which doesn't require a nav controller).
97ERROR

“Select the View Controller from the previously existing scene and press J to
delete the old scene. Notice that the table view automatically gets the incoming
arrow from its left side, which indicates it is the app’s initial view controller
(this can also be inspected in the table view controller’s attribute inspector).”

When I deleted the View Controller, XCode did not make the new Table View Controller the default, giving it the arrow into its left side. (And, it should be the incoming arrow to its left side.)

I’m on Xcode 6.0 (6A313)

2014-11-23
59TYPO

On line 3 of the example code at the top of the page, I believe there is an ! missing after “(URL: url”. So it should read “(URL: url!)”
[The downloadable code has the !, and won’t compile without it.]

2014-10-04I'm not seeing the ! in the download code, and it shouldn't be needed, because the url initialized on the previous line will create a non-optional NSURL, so it doesn't need to be unwrapped. \n \nIf this is still a problem for you, can you post a message to the forum and I'll follow up there? Thanks. —Chris
74TYPO

Add // before the " I just finished…." and after to write it in the file Localizable.strings (French) as shown in the downloaded code.

2015-01-14There shouldn't be "//" in the .strings files. Any line starting with // would become a comment. We do have some lines like that for code-formatting reasons, but that shouldn't be leaking out to the version you're getting. (Looks at the download). OK, our formatting instructions are being stripped, but the "//" comments are left behind. Since they're on their own line, they do nothing. We'll try to fix the build system to take those out of the download you get too. Update (1/14/15): it looks like the build system did not leave the fragmented comments in the beta 3 download, so I guess it's fixed.
80TYPO

Repetition of the word “method” in first paragraph.

"Every test class that we create will have a setUp() and a tearDown() method method.

2014-10-04
82TYPO

Two sentences merged together in the Side note on OCUnit and XCTest

“XCTest is built on top of OCUnit, so anyone already familiar with OCUnit should fine translating from OCUnit to XCTest is simple and straightforward.”

How about?

“XCTest is built on top of OCUnit, so for anyone already familiar with OCUnit, the translation from OCUnit to XCTest should be simple and straightforward.”

or “XCTest being built on top of OCUnit should make it easy for anyone familiar with OCUnit to translate to XCTest.”

2014-10-04
98ERROR

Top of this page: “In the “Custom Class” field, enter ViewController. This should auto-complete…."

s/b “In the ”Class" field in the “Custom Class” section…."

Also, the field does not auto-complete.

2014-10-05
98ERROR

It looks like all the functions that are overridden on this page also need to be declared as “public”.

2014-10-05Yep, thanks. Same root cause as #77518.
118TYPO

It says: Once it does, tap the “Show My Tweets” button.
There’s no button on the screen anymore. Should be “use the Pull to Refresh”, or something like this.

2014-10-05
93TYPO

End of paragraph just before “Wrap-Up” .
“(…) please check out the excellent book.”

Missing reference to the book itself.
Jonathan Penn’s book I suppose ? ;-)

2014-12-14Yep, production needs to create a bibliography entry for Jonathan's book, so we can hot-link to it.
98ERROR

There seem to be many errors on this page. At the top: “In the “Custom Class” field, enter ViewController." It looks like you enter ViewController in the Class field of the Custom Class section, and also must enter PragmaticTweets in the Module field.

Numerous compiler errors in the UITableViewController functions added on this page. I fixed them one by one, and lost track of the error messages. Here is the code I wound up with, that does run:

override public func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 5
}

override public func tableView(_tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
return “Section \\(section)”
}

override public func tableView(_tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return section + 1;
}

override public func tableView (_tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: nil)
cell.textLabel?.text = “Row \\(indexPath.row)”
return cell
}

2014-10-05
101TYPO

“To create a new class in our project, we use File→New File… (DN)….” s/b File -> New -> File…

2014-10-05
102TYPO

There are some stray semicolons in the code at the bottom of the page.

2014-10-05
108OK

Superfluous figure at the top of the page? Shows an old view of the app; no caption….

2014-11-24That's the second half of the "Grouped Tables" sidebar (our sidebar images don't usually have captions, IIRC), and is there to show the different between the grouped and plain styles (compare to the image at the top of PDF page 100). Notice that with the grouped table, it doesn't go under the status bar. If you were to run with a grouped table view, when you scroll it, the section headers don't "stick" to the top of the view.
109SUGGEST

“Select the cell, and visit its Attributes Inspector (ED4), and set its style to
“Subtitle”." There are a lot of “cells” being bandied about here, so would help to clarify it as Table View Cell.

2014-10-05
111TYPO

“So, in the File Navigator, select the “Pragmatic Tweets” group, go to File→New File…" s/b File -> New -> File…

2014-10-05
110ERROR

“Then, in the Identity Inspector (ED3), change its class to the ParsedTweetCell class that we just created.” I think this needs to mention the Module too (PragmaticTweets).

2014-10-05
111TYPO

“Within the cell, we can labels, image views, whatever we like…” missing word?

2014-10-05I wish I could say it was an intentional LOLcats-style joke. WE CAN HAZ LABELZ?
19TYPO

Word “is” in final sentence of first paragraph of Storyboard section should be removed.

2014-10-04
19SUGGEST

In the last paragraph I had to click on the View to see the proxy objects;

2014-11-23
26SUGGEST

The Warning box should be moved to just after the discussion of the sizing bar.

2014-10-04
47ERROR

Keyword weak is missing in inserted code shown in book.

2014-11-23
53TYPO

Drop the “we” in the 2nd paragraph in the “Swift Structures” comment box.

2014-10-04
59TYPO

In the first paragraph of the section “Internationalization” in line 3 the second use of the word “a” should be “of”

2014-10-04
140SUGGEST

On the last paragraph the book tell us to create a group for Root VC, but the image on the next page (#141) show 2 groups (Root VC and Twitter Classes), and a file we didn’t create yet (TwitterAPIRequest). This don’t affect the meaning, but could show just what has been to done to this point.

2014-10-05
61ERROR

LaunchScreen.xib also showed up on the slide out sheet described in top paragraph.

2014-11-23See comment on #77384
62ERROR

In paragraph 2 Storyboard.main should be Main.Storyboard

2014-10-04
63TYPO

In the bottom paragraph click Localized instead of OK. Button label has been changed.

2014-10-04
64ERROR

Path is now “GeneralLanguage & Region>iPhone Language” instead of “General→International→Language”

2014-10-04
64ERROR

“J’ai fini le projet” is not there but “Envoyer Tweet” is there.

2015-01-13Apple has acknowledged that i18n support is broken for 3rd party apps in the iOS 8.1 simulator: https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html \nWould like to keep this open until the next release from Apple to see if they fix it (this chapter was fine in Xcode 6.0 / iOS 8.0). \n \n1/12/15: Added a warning about broken i18n in 6.1 and 6.1.1. Still think it's appropriate to hope for a fix in 6.2, since it worked in 6.0.
116ERROR

overriding viewDidLoad() must be marked as public.

2014-10-05
6TYPO

In the box “My First Computer”, paragraph 3, text reads “Inevitably, computers got away writing programs…”. In context, it seems likely that it was meant to read “Inevitably, computers got away from writing programs…”

2014-10-04
5ERROR

Paragraph 3 states “Click the ‘eye’ icon next to this”, in reference to the “Math is easy” string. I wish I could upload a screenshot, but with my version of Xcode (Version 6.0.1 (6A317)), the eye does not appear next to the final statement with the math string like it does in Figure 4. However, if I click the eye for the statement above that, myLabel.textColor = UIColor.whiteColor(), then the text in that popup is set to the math string with a white color and a red background.

2014-11-24
87ERROR

The whole scenario in Adding a Table View to the Storyboard fails miserably most;y because the starting point is unclear. Do we start with the code from the preceding chapter or start over with a new clean project?

2014-11-23
127ERROR

“The JSONObjectWithData()’s third parameter is listed as an NSErrorPointer” Should this be “NSError”?

2014-10-05This is described in the bullet point that begins "The JSONObjectWithData()’s third parameter…". In the next beta, we'll clarify Swift's terminology for this concept: the "in-out parameter".
131SUGGEST

It would help to be clearer about where this code goes:

if parseError != nil {
return
}

2014-10-05
134TYPO

Superfluous semicolon at bottom of page.

2014-10-05
139SUGGEST

“What’s happened? A race condition, actually. When a cell goes offscreen and is queued for reuse, it will eventually get dequeued and filled with new data. But the closure doesn’t know that.”

We’ve got lots of closures in the code now…which closure are we referring to here?

2014-10-05
139SUGGEST

It would help to be explicit as to where the code snippet at the bottom of this page goes.

2014-10-05
146ERROR

“For consistency, we want the file name to match its contents, so in the file navigator on the left (D1), select ViewController.swift, click again to edit the line, and change its name to RootViewController.swift”

When attempting to rename the file, I got ‘The document RootViewController.swift’ could not be saved. The file has been changed by another application."

2014-11-23Sometimes happens if you're using git/svn version control. Is this still happening for you? If so, please start a forum discussion so we can debug.
146ERROR

“The first field here is “Custom Class”, which we used before when we were telling the storyboard to use our custom table cell class." Same issue here again with the Custom Class section and the Class and Module fields, as opposed to a Custom Class field.

2014-10-05
148ERROR

The navigator diagram at the top of the page does not reflect the state of the project files at this point in time. There has been no Twitter Classes folder created, nor do all the files shown in that group exist yet.

2014-10-05Yep, see also #77470
149TYPO

“Move the files for the existing ParsedTweet in here….” s/b “file,” singular

2014-10-05Muscle memory of when we had both a .h and a .m file for every class, I guess.
149TYPO

“Choose the iOS →Cocoa Touch → Class template….” s/b iOS -> Source -> Cocoa Touch Class

2014-10-05
150TYPO

“Select the “Twitter Classes” croup…." s/b “group”

2014-10-05
150TYPO

Superfluous semicolon on line 5 of the code snippet.

2014-10-05
154TYPO

“This class has to do with how our app interacts with the rest of the application….” Huh? Don’t app and application mean the same thing? What does this mean?

2014-10-05
158TYPO

“Switch to the storyboard and then locate the Navigation Controller in the
Object Library; it looks like a yellow circle with a blue “back” arrow in it, like this:"

Fig 59 does not match this description.

2014-10-05
160TYPO

“Under “Triggered Segues”, there’s a connection called “Root View Controller”. s/b “root view controller”

2014-10-05
73TYPO

“anyone already familiar with OCUnit should fine translating from OCUnit to XCTest” Should be: find.

2014-10-04
32SUGGEST

I found while following along and writing the tweet button handler, not having SLComposeViewController available and getting build errors (as designed!), my first instinct is to fix that problem… reading on I see that we need to “import Social”, but (perhaps it’s just me) I don’t imagine many people would keep typing while a build error exists.

I’ve seen this pattern in other programming books/tutorials too, and every time I wish the author had just started off by explaining that they following code will require these imports, or - alternatively - just included the import in the first code snippet. I realise the intention is to show what happens when trying to use a class that isn’t imported, but I think we’ll run into that problem enough on our own :)

2014-11-23
51ERROR

The text says:

“We saw this in the last chapter when we inspected the project’s build phases and added Social.framework to the frameworks that were already part of the project”

Actually, all I remember doing was “import Social”. I think in Objective C/older versions of XCode you did have to do this. But, you don’t any longer it seems :)

2014-10-04
110OK

In the Custom Table Cells, first paragraph.

I get ParsedTweetCellTableViewCell as a choice (or UITableViewCell) in the Identity inspector.
The text says “Subclass of:” to UITableViewCell

2014-10-05
110OK

Please disregard erratum #77511. Me bad ;-)

2014-10-05OK, thanks.
116TYPO

Beginning of third paragraph.
“The UITableViewController that our PRPViewController subclasses… ”

Should not it be “that our ViewController” simply?

2014-10-05
116TYPO

Last paragraph.
“we’re promising to write a method called handleRequest()…”

Do you mean “handleRefresh:” ?

2014-10-05
98SUGGEST

Aside from the compiler warnings already mentioned, it seems that:

  • The text doesn’t mention needing to delete the call to reloadTweets from the constructor (although it’s easy enough to figure out)
  • The WebViewTests now fail, and since they tested the now deleted web view that whole file could be deleted… not sure if this is done later though!
  • A compiler warning is generated because there is no reuse identifier on the table view. I guess it’s OK to ignore for now, but good to be aware of.
2014-11-23
97ERROR

“override func viewDidLoad()” needs to be made public - “override public func viewDidLoad()” (XCode provided this correction).

Note: I noticed that I have been referencing the absolute page number instead of the number printed on the page in the PDF. I will use the printed number on the page from now on.

2014-10-05Thanks. What happened here is that we moved the testing stuff earlier in the book at the last minute. Testing required us to make that class public, and that means that override and delegate methods need to also be public. But the download code for that chapter is still from when tables came before tests. \n \nWe're going to rebuild all the projects from scratch to fix problems like this, but probably after 6.1, since it introduces Swift API changes that break other parts of the code. So it'll make more sense to just do everything at once.
139TYPO

Errant “;” at the end of second to last line of code

“cell.avatarImageView.image = nil;”

2014-10-05
144OK

Second sentence: putting functionality into a plural? “functionalities”
in
" We’ve swapped different functionality into and out of this view, …"

2014-10-05I think the abstract "functionality" is OK here… it has this functionality, then it had some other functionality. It's a judgement call, so let's leave it for the copy-editor to figure out. :-)
143TYPO

Second line: replace “croup” by “group”
in
“Select the ”Twitter Classes" croup and do …"

2014-10-05
16TYPO

Missing word “Here’s what that looks like if we HIT the buttons for…”

2014-10-04
24TYPO

last paragraph: “which is meant to clean up some of the cruft hat has accumulated around C” should be presumably Cruft THAT has…

2014-10-04
148TYPO

Missing “i” for the word “with” in method name “performRequestWthHandler()” in the last paragraph.

2014-10-05
40OK

I would generally recommend putting the figures before the text that explains them. Currently you have to read and remember a lot before the actual screenshot appears oftentimes on the next page.

If you get the screenshot upfront, you tend to understand the written content better, because you can relate it to the things you have seen.

2014-11-24Prags' style is to float figures, generally after the text that references them.
64ERROR

Looks like an ObjectiveC leftover: “In PRPViewController.m, rewrite the handleTweetButtonTapped method. . .”

2014-10-04
153TYPO

Just a little “;” at the end of the last line of code of the page
“delegate : self);”
I know it does not hurt and the compiler is happy though. Just fun to see them cropping back up sometimes. They are missed! ;-)

2014-10-05
154TYPO

Same as issue # 77430 about then “t” in “Exensions”

2014-10-05
120ERROR

Another case where the text says to ‘Run this, tap “Show My Tweets”’ after the button has been removed and replaced with a tableview and pull-to-refresh control. Actually, with the current implementation it fetches the tweets on viewDidLoad, so there’s no need to refresh either.

2014-10-05
126ERROR

The semicolon at the end of the println statement isn’t necessary

2014-10-05Hard habit to break after programming in C, off and on for 30 years!
51ERROR

In the second paragraph you are talkin about adding the Social.framework to the build phases. That didn’t happen in the last chapters. The only thing one can find is the “import Social”.

2014-10-04
145TYPO

The text says “In the handleTwitterData() call, change the target from self to delegate,…”. Actually, delegate needs to be unnwrapped, so it should say “change the target from self to delegate!” I think.

2014-10-05
162ERROR

function prepareForSegue needs to be declared public.

2014-10-05
158TYPO

“…we’re reading to start navigating. “Reading” should be “ready”.

2014-10-05
159ERROR

The text says to select the “Parsed Tweet Cell”. It’s still called “CustomTweetCell” (unless I missed changing it earlier?)

2014-11-23I'm going to leave this open until we rebuild all the projects for Xcode 6.1 in the final chapter order, and then we'll know for sure what the correct name is in the scene list. \n \n11/23/14: Yeah, it's now CustomTweetCell in the fixed code. Thanks.
160SUGGEST

Test text says “Drag a Navigation Item icon (shown below) from the Object Library to the new scene.”

Shouldn’t we drag it to the navigation title bar area, specifically? Does it make a difference?

2014-10-05I like dragging it to the scene list, since the blue line drop target will give me a better idea of where it's going to land in in the hierarchy (eg, as a child of the view controller). I had never thought to drag to the title bar, although for a Navigation Item that does indeed work!
164SUGGEST

One of the labels and its constraint is “A label called “Real Name” top-aligned to the button,…". We haven’t used an alignment constraint like that before, however I did figure out that you need to select both the label and button and can then add the constraint via the Align popup menu. I might be worthwhile mentioning that.

2014-10-05
43TYPO

Page says:

Visit the log navigator using
the rightmost button in the Navigator area toolbar, or just type D8.

It appears to be called the “Report Navigator” in Xcode 6.

2014-11-23
33OK

Chapter 1 has a section that has you search for “social framework” and clicking on the “Social Framework Reference” result. It then says to scroll down to the class listing and discover that there are just four classes (one of which is supposedly SLComposeViewController).

When I do the search and click on the result, I only see one class in the Class Reference section(the only class I see is SLRequest).

Am I missing something?

2014-11-24Once you actually visit the Social Framework Reference document, scrolling down should show two subclasses of NSObject (SLComposeSheetConfigurationItem and SLRequest), and two of UIViewController (SLComposeServiceViewController and SLComposeViewController). At least that's what I'm seeing with the Xcode 6.1 documentation.
168ERROR

When the text asks to “verify everything’s OK”, I ran the app but found it crashed in viewWillAppear(animated:), which was defined on page 166, at the line it calls the super method.

I looked at the linked file in the PDF and the implementation there used viewWillAppear() (although was just a stubbed method). So, I tried using this method instead and it worked.

override func viewDidLoad() {
super.viewDidLoad()
reloadTweetDetails()
}

Hmm, I have no idea why.

2014-11-23We've rewritten all the code for beta 3, and the viewWillAppear() call is not crashing in the sample code, so we think this should be settled now.
167TYPO

Middle of the page. First paragraph of “Using the Storyboard Segue”, second sentence.
“But hold up, how do we know which tweet was selected?”

Did you mean “hold on” as in wait a minute?
I might just not be familiar with that use of “hold up” though ;-)

2014-11-23Yep, equivalent to "hold on". But maybe a little strange, since as a transitive verb it means "to rob" (as in a bank), or "to delay". I guess we should change it to "hold on"
182TYPO

Second paragraph:
“An unwind method needs to have @IBAction annotation (…), take a UIStoryboardSegue as a parameter, and return nothing.”
First verb is 3rd person singular for the unwind method but “take” and “return” should be too, not plural.

2014-11-23
25TYPO

“Top Layout Guide”, meaning we want to lock the distance between the top of our button and the area… should read….“Top Layout Guide”, meaning we want to lock the distance between the top of our label

2014-11-23
194TYPO

End of first sentence, continuing from p 193
“However, if we tap one of the tweets, it doesn’t populate the detail view and take it to us.”
Did you mean " and take us to it" ?

2014-11-23
201TYPO

Last paragraph, last sentence.
“On a sufficiently large device, the spilt view… ”

split view instead of “spilt view”

2014-11-23
38TYPO

At the top of the page, “According to creator, Chris Lattner”. This should probably either read “According to creator Chris Lattner”, dropping the comma, or “According to its creator, Christ Lattner, …”.

2014-11-23
162TYPO

Unsure about what “well” means here in the second paragraph, second sentence.
“A well to accept the drop will appear, …”

2014-11-23A "well" is an OS X user interface component that has indentation and shadowing to suggest it has depth, and is something that accepts drops. \n \nOK, it's a weird term, and Yosemite nukes all the sense of depth anyways (thanks, Jony Ive). I'm going to change this to "highlight".
102TYPO

“Within the cell, we can labels, image views, whatever we like” — you need to add “add”

2014-11-23
167TYPO

Second to last paragraph, last sentence: repetition of “to”

“… but we can override to to take some interesting action, ..”
Maybe “override it to take …”

2014-11-23
168SUGGEST

Not an error: just a pleasant surprise. You had guessed what mistake I would make…. I did misspell the segue identifier in the RootViewController.swift, and it did not work, as you just said… ;-) Made my day!

2014-11-23We do this ALL the time. :-)
168TYPO

Last paragraph in last sentence before code snippet.

“where we to the rest of our JSON unpacking:”

Replace “to” with “do”

2014-11-23
170TYPO

Middle of the page: “when” to be replaced by “then” ?
in
“If this works, when we can assign the …”

2014-11-23
182ERROR

Xcode 6.1 shows multiple errors for the tableView(cellForRowAtIndexPath:) function. In the function definition, the ! after the parameter types UITableView and NSIndexPath causes complaints about implicitly unwrapped optional types. Removing the ! from each clears these complaints.

Also, the line:

cell.textLabel.text = “Row \\(indexPath.row)”

shows:
‘UITableViewCell?’ does not have a member named ‘textLabel’

I also tried the downloadable sample code, and it has the same problem, even with .textLabel! instead of .textLabel. If I double-click UITableViewCell and Jump to Definition, it shows that textLabel is defined.

This can be corrected by changing that line to:

cell.text = “Row \\(indexPath.row)”

and changing the return line to:

return cell!

The code then works as shown in the book.

2014-11-23
74TYPO

In the TDD section of Chapter 4 (its on page 151 of the .epub version in iBooks):

“Make sure this class is a subclass of XCTest” should be “Make sure this class is a subclass of XCTestCase”

2014-11-23
55ERROR

In the Arrays section of Collections, the paragraph after the musicGenres code block, there’s old Array type declaration syntax — “String[]” should be “[String]” in the line:

“..We could make that explicit by making the declaration var musicGenres: String[].”

2014-11-23
31TYPO

In the section “Calling Up the SLComposeViewController”, the last line of the first paragraph references “PRPViewController.m” — which should be updated to “ViewController.swift”

2014-11-23
107TYPO

One more reference to “PRPViewController” which should just read “ViewController”

2014-11-23
56ERROR

Based on later statements, first line of the page should be appending, not assigning:
“musicGenres = 2.99” should be “musicGenres += 2.99”

2014-11-24
89ERROR

Xcode 6.1 shows multiple errors for the tableView(cellForRowAtIndexPath:) function. In the function definition, the ! after the parameter types UITableView and NSIndexPath causes complaints about implicitly unwrapped optional types. Removing the ! from each clears these complaints.

Also, the line:

cell.textLabel.text = “Row \\(indexPath.row)”

shows:
‘UITableViewCell?’ does not have a member named ‘textLabel’

I also tried the downloadable sample code, and it has the same problem, even with .textLabel! instead of .textLabel. If I double-click UITableViewCell and Jump to Definition, it shows that textLabel is defined.

This can be corrected by changing that line to:

cell.text = “Row \\(indexPath.row)”

and changing the return line to:

return cell!

The code then works as shown in the book.

[Sorry, I had originally submitted this with the page number from iBooks, then realized that it wasn’t appearing with the other submissions on table views.]

2014-11-23
59TYPO

In 1st paragraph of Internationalization “a lot a” should be “a lot of”

2014-11-23
61ERROR

In 1st paragraph LaunchScreen.xib showed in addition to Main.storyboard

2014-11-23
62ERROR

In paragraph 2 “Storyboard.main” should be “Main.storyboard”

2014-10-14
64ERROR

In paragraph 2 navigation through Settings has changed a lot in iOS 8.2. Also French labels have changed

2014-11-24
73TYPO

In paragraph 2 of OCUnit and XCTest “should fine translating” should be “should feel fine since translating”

2014-11-23
74ThiTYPO

Third full paragraph “XCTest” should be “XCTestCase”

2014-11-23
162SUGGEST

The paragraph about wiring up the “+” button that spans (ebook) pp 162-163 has a number of issues.

1. “there is just a “Triggered Segues action” and a “Sent Actions selector”…actually, there are those two, and “Referencing Outlets” and “Referencing Outlets Collection”

2. “drag from “selector” over to the Root View Controller icon (the yellow ball that now says “Tweets”)“…i don’t see a yellow ball that says ”Tweets"

I must be doing something wrong here. I can’t get the drag of the selector to “activate” anything. Help, anyone?

2014-11-23
167TYPO

“When we tap a cell in the list of tweets, we navigate to the new view controller, which we’ll customize to show the details fo the selected tweet.” “fo” -> “for”

2014-11-23
63ERROR

In the explanation of the NSBundle method localizedStringForKey:value:table:, the second parameter is referred to as “variable” rather than “value”, and it says we passed it nil, when the figure above shows we pass it an empty string literal. I assume this is all stale text referring to an old objective-C behavior of the API?

2014-11-23
167ERROR

“The only attributes we can edit are the Identifier and the Style (which can be “Show”, “Show Detail”, “Present Modally”, etc.)." s/b “…are the Identifier and the Segue….”

2014-11-23
167SUGGEST

“The only attributes we can edit are the Identifier and the Style (which can be “Show”, “Show Detail”, “Present Modally”, etc.). For the identifier, enter showTweetDetailsSegue."

Might be nice to say what the Segue field should be set to, even if it’s the default.

2014-11-23
169ERROR

“Then select this group and do File→New →File… to create a new “Cocoa class” file." s/b “…to create a new ”Cocoa Touch Class" file."

2014-11-23
169SUGGEST

“Fix that by selecting the second view controller in the storyboard….”

Naming that controller explicitly might be more robust than calling it the “second” controller.

2014-11-23
169ERROR

Bottom of 169, top of 170: “Under “Custom Class”, change the class from UIViewController to TweetDetailViewController (it should auto-complete
as you type)."

It doesn’t auto-complete for me.

2014-11-23Did for us, but we've seen other times when it doesn't autocomplete (but will happily do so after restarting Xcode). Can we chalk this up to "Xcode is flaky"? \n \nOther possibility is that your TweetDetailViewController doesn't subclass UIViewController, or that Xcode hasn't figured our that TweetDetailViewController is a subclass (kicking off a build with cmd-B might help).
170TYPO

Middle of page in code snippet: superfluous semicolon.

2014-11-23
170OK

In “Designing the Second View Controller,” references to “superview” should possibly be just to “view”? I’m not seeing any way to set for “superview.”

2014-11-23We're speaking semantically here — the pin popover does indeed say "View", but that's a reference to the superview that contains the button and labels. And once there are multiple "Views", it gets confusing to be so literal in our description.
170SUGGEST

“A label called “User Name” just below it…." might be more clear as, “A label called ”User Name" just below the “Real Name” label…."

2014-11-23
171SUGGEST

MKMapView is called MapKit View in the object library. Probably better to call it that on this page?

2014-11-23
171ERROR

MapKit View is not shown in Figure 70, but it should be there.

2014-11-23
98ERROR

four overridden functions in ViewController must be declared public otherwise error is thrown.

2014-11-23
174OK

I’m getting a runtime error after writing the handleTwitterData method:

2014-10-13 12:41:15.632 PragmaticTweets[33640:8169342] Unknown class TweetDetailViewController in Interface Builder file.
2014-10-13 12:41:15.998 PragmaticTweets[33640:8169342] * Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<UIViewController 0x7fdf495bf1b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tweetLocationMapView.’

I think I’ve eliminated a typo as the problem. Will go back and reread the section for anything I missed. In the meantime, if anyone knows that cause of this, I’d love the help! The message seems pretty obscure to me, though there is lots of info in Googleville.

2014-11-23Error means the storyboard wants an outlet to tweetLocationMapView, and there is no such property in the view controller. Two things to look at here: \n \n* Is the second scene's view controller set to be a TweetDetailViewController? Check the identity inspector. If it's a generic UIViewController, there would indeed not be a tweetLocationMapView to connect to. \n* Otherwise, control click on the view controller (or show its connections inspector) to see if any of the connections have a warning icon. This happens a lot when you rename an outlet in your code file and don't make a corresponding change in the storyboard (Refactor->Rename used to do the change in both places for us, but doesn't work with Swift). \n \nFWIW, we got rid of the Map Kit stuff for beta 3 because it was too much of an infodump, but this would still be a problem for the image view we're now using, if either the VC was the wrong class or if there was a broken connection. \n \nAnyways, this would be far better to discuss in the book's forum than in an errata. Please make a post there if this is still a problem.
158OK

Somewhere around this page, need to note that Custom Class Module for this new controller needs to be set to PragmaticTweets.

2014-11-24We do this later, in the beginning of the "Sending data via a segue" sub-section. Thanks.
172ERROR

Xcode seems to be create the @IBOutlet connections with the “weak” modifier, so might want to change the code snippet to:

IBOutlet weak var userImageButton: UIButton! IBOutlet weak var userRealNameLabel: UILabel!
IBOutlet weak var userScreenNameLabel: UILabel! IBOutlet weak var tweetTextLabel: UILabel!
@IBOutlet weak var tweetLocationMapView: MKMapView!

2014-11-23
163ERROR

reloadTweetDetails() is called twice in TweetDetailViewController. Once in the tweetIDString setter (p163). Again in viewWillAppear (p166), This causes the Twitter API to be called twice. I verified this by putting a println in handleTwitterData for TweetDetailViewController. You don’t need them both.

2014-11-23Good catch. We actually do need it in both places in the later chapters, when the TweetDetailViewController becomes part of a split view, and viewDidLoad() is only called once. At that point, we need didSet for the tweetIDString to kick off the UI update. In practice, we could do some sort of check to avoid an unneeded reload, but we didn't want to make this chapter (probably the hardest in the book) even more challenging with that side-track.
99SUGGEST

The Cell-reuse section is a little confusing with reuseIdentifiers. When I read it, I thought that the reuseIdentifier represented a single cell. However, the reuseIdentifier is used to represent a type of UITableViewCell and is manage a pool of specific UITableViewCells when reusing it. I thought it would be more correct to explain how that works

2014-11-23
100ERROR

cell.textLabel!.text = parsedTweet.tweetText should be cell.textLabel?.text = parsedTweet.text

2014-11-23
176ERROR

The map does not work for me. Examining the JSON object returned by Twitter, the “geo” entry is always .

2014-11-23There aren't a lot of tweets with geo data. We've replaced the Map Kit stuff with an image view for beta 3 anyways.
168SUGGEST

I almost never get a non-blank “geo” response from Twitter. So the map only very rarely shows. I think this is because “geo” is deprecated in the Twitter API (disallowed linked to the dev twitter overview api tweets page goes here) I modified your routine to use the “place”/“bounding_box”/“coordinates” instead and it gets a lot more map responses.

2014-11-23In beta 3.0, we're replacing the geo stuff with an image view for tweets that have attached images, as we've found that there are FAR more tweets with pictures than tweets with geo data. Plus, the page of MapKit stuff seemed like a super-dense brain-dump that was just too much in too little space.
178TYPO

“that group, create a new file, using the iOS “Cocoa Class” template…" s/b “Cocoa Touch Class”

2014-11-23
179TYPO

Superfluous comma just past middle of page, on “return” statement.

2014-11-23
180SUGGEST

“That’s something the second view controller will do as it begins the segue.”

It might be better to more specifically identify “the second view controller,” as there is really no order to the view controllers.

2014-11-23
181TYPO

“These methods, commonly called unwind methods have to follow a certain signature — they take a UIStoryboardSegue parameter and have return type IBAction….”

But the code for this function (on the top of the next page) doesn’t have a return type at all.

2014-11-23
114ERROR

in line 8 of the code example for the new reloadTweets: implementation to use ACAccountStore, the type declaration of the completion closure is still using the old obj-c syntax.

‘(Bool granted, NSError error) -> Void in’ should be
‘(granted: Bool, error: NSError) -> Void in’

2014-11-23
117ERROR

Another place where the obj-c type declaration syntax is hanging around.

Line 12 in the code example, in performRequestWithHandler:
‘(NSData data, NSHTTPURLResponse urlResponse, NSError error) -> Void in’ should be
‘(data: NSData, urlResponse: NSHTTPURLResponse, NSError: error) -> Void in’

2014-11-23And now I'm wondering how that even compiled…
132OK

dispatch_async(dispatch_get_main_queue(), { cell.avatarImageView.image = avatarImage } should be dispatch_async(dispatch_get_main_queue(), { () -> Void in cell.avatarImageView.image = avatarImage }

2014-11-24Pretty sure we don't explicitly need that, because the "() -> Void" means "closure that takes no arguments and returns Void", and Swift allows us to omit that and just use the curly-braced contents of the closure.
184TYPO

“Finally, select the split view controller, bring up its attribute inspector ( ED3), and select the “Is Initial View Controller” checkbox."

— option-command-3 should be option-command-4 for the attribute inspector.

2014-11-23
187TYPO

“The UIViewController class has an optional property, splitViewController, defined ad “the nearest ancestor …”
— should be “as”

2014-11-23
104ERROR

Line 11 of code:

UIImage (data: NSData (contentsOfURL: parsedTweet.userAvatarURL!))

throws error in Xcode 6.1:
Value of optional type ‘NSData?’ not unwrapped; did you mean to use ‘!’ or ‘?’?

and will not build. Xcode suggests following correction:

UIImage (data: NSData (contentsOfURL: parsedTweet.userAvatarURL)

Which compiles but images are not scaled properly.

2014-11-23
175TYPO

Unnecessary comma after return statement.

(already reported in B1.0 by another reader).

2014-11-23
176ERROR

Both userImageURL and NSData need to be unwrapped (probably an Xcode 6.1 change). So, the last line in the handleTwitterData function should be:

self.userImageView.image = UIImage(data: NSData(contentsOfURL: userImageURL)

2014-11-23
176SUGGEST

Xcode offered an autocomplete for prepareWithSegue with a non-optional UIStoryboardSegue parameter.

I found that either the signature in the book or using the suggested signature (with unwraps for segue removed) both worked.

I’m not sure which is the preferred way to implement it, but I’m guessing Xcode suggested the new preferred way of doing it.

2014-11-23
80ERROR

Had to do a Project=>Clean to get this to work on Xcode 6.1.

2014-11-23
49ERROR

Got an error in Xcode 6.1 for not having a ! in front of url accepted fixit suggestion.

2014-11-23
48ERROR

Name to enter should be “handleShowMyTweetsButtonTapped” instead of “handleShowMyTweetsTapped” paragraph 3 of Calling in to the UIWebView property.

2014-11-23
43ERROR

No “Button - ” in Xcode 6.1 simply “Show My Tweets”

2014-11-23
247TYPO

first page of chapter 14. 3rd paragraph:
“One of the single biggest favors we can do for ourselves is to become a fast
and efficinet debugger.”
Should read efficient debugger.

2014-11-23
244TYPO

Chapter 14. Debugging Apps • 244
The following text appears on a line by itself half way down the page just before Figure 106: Sure. -JCH

2014-11-23
246TYPO

Chapter 14. Debugging Apps • 246
Mispelling in 2nd paragraph just before figure 107. “Craete a breakpoint” should read “Create a breakpoint”

2014-11-23
64ERROR

In the Simulator it seems to be necessary to set also ‘Application Language’ in the Scheme Settings[1]. Otherwise it won’t work for me.

Simulator Version 8.1 (550.3)

[1] rshankar.com/wp-content/uploads/2014/08/201408071852.jpg

Source:
rshankar.com/internationalization-and-localization-of-apps-in-xcode-6-and-swift/

2015-01-13Apple has acknowledged that i18n support is broken for 3rd party apps in the iOS 8.1 simulator: https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html \nWould like to keep this open until the next release from Apple to see if they fix it (this chapter was fine in Xcode 6.0 / iOS 8.0). \n \n1/12/15: Added a warning about broken i18n in 6.1 and 6.1.1. Still think it's appropriate to hope for a fix in 6.2, since it worked in 6.0.
225ERROR

I think this text is wrong: “Control-click on the user view controller to see its connections. Under “Triggered Segues”, drag from the “Manual” connection ball down to the new user detail scene, as seen in the following figure"

It’s not clear what you mean by “user view controller”. I believe the one you want to control-click is the “Size Class Overriding View Controller”. And that’s what Figure 97 seems to show.

2014-11-23
190SUGGEST

“Drag the “Tweets” up to the right of the surviving navigation controller…." Probably s/b “Drag the ‘Tweets’ Scene….”

2014-11-23
190SUGGEST

“Drag the “Tweets” up to the right of the surviving navigation controller…." Since you don’t say specifically where to drag the Split View Controller into the storyboard, assuming that the reader will drag the Tweets scene “up to the right” is not valid.

2014-11-23
190SUGGEST

“Delete the empty default detail scene.” It might be useful to say, again, “the one attached to the new Split View Controller.”

2014-11-23
193ERROR

“So there should be two: the navigation controller that’s in front of our RootViewController, and the TweetDetailViewController.”

Maybe you’re using RootViewController generically speaking, but we just deleted the RootViewController a page or two ago.

2014-11-23
196SUGGEST

“The first step to dealing with starting on the wrong scene is knowing that we’re even in this scenario and that we need to do something. Actually, we can get that by becoming the split view controller’s delegate.”

I found this hard to understand at first reading. I read it as though the “speaker” was the developer, trying to figure out how to debug the problem, but you’re actually speaking “as the code,” saying that “we” (the code) needs to detect that it’s in a particular condition. (At least I think that’s what’s going on here.)

Not sure that I have a suggestion, but if you see what I’m saying, I’m sure you can figure it out!

2014-11-23
196TYPO

“Start in RootViewController.swift by appending UISplitViewControllerDelegate to the comma-separated list of protocols in the class declaration." Superfluous "”.

2014-11-23
200TYPO

Figure 83, the grey and white box colors are reversed from what is described in the text (which matches what actually appears in Xcode).

2014-11-23
202TYPO

Bottom of page: a couple of superfluous semicolons.

2014-11-23
203TYPO

“Finally, if our width isn’t big enough for the split view controller go to into side-by-side mode….” s/b “to go into”.

2014-11-23
203TYPO

“On a sufficiently large device, the spilt view controller….” s/b “split view controller”.

2014-11-23
206-7TYPO

“…but the gesture recognizer will become a top-level member of the of the scene….” A couple of extra words in there.

2014-11-23
208TYPO

“Back in UserDetailViewController.wift….” s/b .swift

2014-11-23
208TYPO

“…control drag from the “Done” button to the green Exit Segue button." “green” -> “orange”

2014-11-23I did like it better when it was green, honestly.
210SUGGEST

“Start by going to the storyboard, going to the last scene….” I prefer explicitly identifying the scene, rather than the generic “last.”

2014-11-23
210ERROR

“Bring up the Assistant Editor (the “tuxedo”
toolbar button…." The Assistant Editor button is no longer a tuxedo; it’s now two linked circles.

2014-11-23
214SUGGEST

“Fortunately, we don’t have to use the members of CGAffineTransform directly. In fact, we almost never do.”

Might be a tiny bit more clear to add “here” to the end of the first sentence. As written, the first sentence sounds like a general statement. Then when you read the second sentence, which is definitely a general statement, the first sounds a little odd.

2014-11-23
215SUGGEST

“This connection will call handlePanGesture:() when a pan gesture starts….” Is handlePanGesture:() Objective C syntax? For Swift, maybe just handlePanGesture?

2014-11-23
58TYPO

The code line:
@IBOutlet var twitterWebView : UIWebView!

should read:
@IBOutlet weak var twitterWebView: UIWebView!

as the text states:
the “Storage” says “Weak”

2014-11-23
216SUGGEST

It’s not stated in the text exactly where the third code snippet on this page (the one starting with “if sender.state UIGestureRecognizerState.Began || sender.state UIGestureRecognizerState.Changed {”) goes in the code. Presumably it comes immediately after the previous snippet, but this wasn’t clear (to me).

2014-11-23
217TYPO

Very bottom of the page: “…and switch the type from id to UITapGestureRecognizer.” s/b, “…and switch the type from AnyObject to UITapGestureRecognizer.”

2014-11-23
217OK

The Identity Transform

The code in this section works fine and makes sense, but the motivation set up in the text seems odd. I’m not sure how I would be able to drag the image off the screen. I couldn’t do it. And if I dragged it off the screen, how then would I be able to double-tap it?

2014-11-24You could get it most of the way offscreen, but yeah, you couldn't get every pixel off. And yes, being able to only double-tap inside the image is a limitation… one that we address in the next section.
221SUGGEST

When we delete the image view, we lose our constraint for the Done button. It might be worth at least a mention that we’ll have to fix that.

2014-11-23In beta 3, we're going to pin the button to the bottom of the screen (and center it with respect to the superview), so there won't be a layout dependency that gets nuked with the image. Nice catch, BTW.
229ERROR

“Control-click on the user view controller to see its connections.” I think you meant the Size Class Overriding View Controller.

2014-11-23
232SUGGEST

After entering the pragtweets: URL in Safari, the simulator took me directly to (the correct scene in) our app. IOW, it did not give the confirm dialog as to whether or not it should open our app.

2014-11-23When I was rebuilding the code for Xcode 6.1, it gave me the confirm dialog the *second* time I used a pragtweets: URL. Gonna leave this, under the assumption that you're supposed to see it the first time.
233SUGGEST

“Use the x-button to delete the existing unwind segue, then control-drag from the button to the orange “Exit”
icon in the title bar atop the scene…."

I suggest, for clarity, “Use the x-button to delete the existing unwind segue, close the connections popup, then control-drag from the button to the orange “Exit” icon in the title bar atop the scene…."

2014-11-23
236ERROR

After “installing” the new keyboard, the globe does not appear by the spacebar for me.

2014-11-23See #77748. Apple has acknowledged that i18n and 3rd party keyboards are broken in most Simulator apps in Xcode 6.1. Should be visible in Spotlight and Contacts.
210SUGGEST

Seconded Stephen P Crozier’s comment about not knowing where the third code snippet on the page (although he labeled it 216, but it’s really 210) should go. I looked at the linked file online to figure it out. Without stating it, it seems like you’re editing the if condition from the previous snippet.

2014-11-23Clarified this for beta 3. BTW, you're both right about the page number: it's 210 in the top header, but 216 if you bring it up in Preview, accounting for the "frontmatter" pages, like the cover and table of contents. So when we fix these errata, we always need to check both interpretations of the page number to find the issue.
260SUGGEST

“Go to Xcode→Preferences or enter [command symbol], to access the Preferences window.” I’m not sure what enter [command symbol] means.

2014-11-23
260TYPO

Lastly, go into the drop-down menu and select
“Active Window.” s/b “active window.”

2014-11-23
225SUGGEST

The test says to “use its view controller icon in the scene list to give it a unique name to keep things straight (like “User Detail from URL Scene”)." I can’t find any way to change the scene name from “Use Scene” to anything else.

2014-11-23Clarifying to say that the name field next to the view controller icon (in the scene list) is editable text
232OK

Seconded Stephen’s issue (his page 236) - Keyboard isn’t showing up in the list of keyboards after adding it in Settings.

2014-11-24This is an Apple bug acknowledged in the Xcode 6.1 release notes: in most apps, Simulator will only show the English and Emoji keyboards. Alternate keyboards (including ours) only work in Spotlight, Contacts, and and Maps. We will have a note about this in beta 3, and really hope that Apple gets their act together in Xcode 6.2. Post from the Apple Devforums about this: https://devforums.apple.com/message/1059125#1059125
2271ERROR

Kindle location 2271: Code example says to use NSURL.URLWithString() - as far as I can tell this method doesn’t appear to exist, and instead I had to use NSURL (string: "blah").

2014-11-23
2758TYPO

Kindle loc. 2758 - Instructs the reader to create the ‘Twitter Classes’ group and move the ParsedTweet class into it, when these instructions are already given shortly before.

2014-11-23
18TYPO

The word “parentheses” was mistakenly written in the book as “parnetheses”

Full context: “evaluate that expression inside the parnetheses, and insert that into the string“

2014-11-23
64ERROR

I had great difficulty getting French to work in Xcode 6.1. Changing the local from the setting app caused crashes. In the end I created a new scheme and set the Application Language to French in the Options pane of the Scheme Editing dialog.

2015-01-13Apple has acknowledged that i18n support is broken for 3rd party apps in the iOS 8.1 simulator: https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html \nWould like to keep this open until the next release from Apple to see if they fix it (this chapter was fine in Xcode 6.0 / iOS 8.0). \n \n1/12/15: Added a warning about broken i18n in 6.1 and 6.1.1. Still think it's appropriate to hope for a fix in 6.2, since it worked in 6.0.
90ERROR

When declaring an NSURL (string: “”) xcode shows an error and suggests “value optional type NSURL? is not unwrapped, do you want ? or !”. Modified to NSURL (string: “”)! to fix the error2203

2014-11-23
27ERROR

I don’t know if this is technical error or not but in the eighth paragraph it says that the editor button is a tuxedo but now it is interlocking circles.

2014-11-23
46SUGGEST

6th paragraph it should be intertwined circles not tuxedo for editor x4

2014-11-23
27ERROR

The assistant editor icon no longer looks like a tuxedo. It’s now more like a Venn diagram

2014-11-23
89ERROR

The instructions on p89,90 are incomplete as follows:
delete self.reloadTweets() from viewDidLoad()
delete the entire reloadTweets function.
The ‘tableView:’, not ‘_tableView’ should be first the parameter for tableView(tileForHeaderInSection:), tableView(numberOfRowsInSection:) and tableView(cellForRowAtIndexPath:). (Just use CodeSense.)
testAutomaticWebLoad() must be deleted from WebViewTests.swift.

I am using XCode 6.1(6A1052d)

2014-11-23
97SUGGEST

On page 97 we call reloadTweets(), but earlier on page 78 we call self.reloadTweets(). Both seem to work. Why one versus the other?

2015-01-18The "self." is inferred when the compiler can do so unambiguously. We should put a Joe Asks in about this somewhere.
100ERROR

cell.textLabel!.text = parsedTweet.userName fails to build, should be cell.textLabel.text = parsedTweet.userName

I’m using Xcode Version 6.1 (6A1052d)

2014-11-23
114ERROR

‘(Bool granted, NSError error) -> Void in’ should be
‘(granted: Bool, error: NSError?)’; NSError must be optional

2014-11-23
117ERROR

NSURL.URLWithString(…) doesn’t seem to exist. The affect line should be:
let twitterAPIURL = NSURL (string: "'the url -hyperlinks are not allowed in errata")

I am using Xcode 6.1

2014-11-23
ivOK

Bullet item states “third party code no longer behaviors” should be “third party code no longer behaves”

2015-01-18Can't find this text in beta 2.0.
118TYPO

Code in “Parsing the Twitter Response” won’t build. This works in Xcode 6.1:
func handleTwitterData(data: NSData!, urlResponse: NSHTTPURLResponse!, error: NSError!){
if let validData = data {
var parseError : NSErrorPointer = nil
if let jsonObject : AnyObject = NSJSONSerialization.JSONObjectWithData(validData, options: NSJSONReadingOptions.allZeros, error: parseError){
println(“JSON error: \\(parseError)\
JSON response:\\(jsonObject)”)
} else if parseError != nil {
println(“JSON error: \\(parseError)”)
}
} else {
println(“handleTwitterData received no data”)
}
}

2014-11-24
118ERROR

Please disregard, my erratum for ‘Parsing the Twitter Response’. The code works as it appears.

2014-11-24
9TYPO

Missing the period on end of the first paragraph of the Introduction (“…just because it’s there”).

2014-12-14
165ERROR

‘create a new “Cocoa class” file’ should be ‘create a new “Cocoa Touch class” file’

2014-12-14
74TYPO

In the final paragraph it should be “Localize…” button not “Localized…”

2014-12-14
63TYPO

In the final paragraph it should be “Localize…” button not “Localized…”

2014-12-14
39SUGGEST

The button for the Assistant Editor no longer looks like a tuxedo, but instead like some interlocking circles.

(The same “tuxedo” comment appears on three other pages as well: 57, 210, and 239.)

2014-12-14
117TYPO

The Twitter API URL is listed two different ways:

+ in list above code: …/statuses/user_timeline.json

+ in code: …/statuses/home_timeline.json

2014-12-14
117SUGGEST

On lines 12 and 13 of the code sample appears this closure:

{
(NSData data, NSHTTPURLResponse urlResponse, NSError error) -> Void in
self.handleTwitterData(data, urlResponse: urlResponse, error: error)
}

What about just using this instead?:

{ self.handleTwitterData }

2015-01-15It's a neat trick, but we don't think our first couple closure examples are the place to introduce Swift's powerful-but-weird syntactic sugar.
126OK

In the code sample for creating the `parsedTweets` array, how about using `map` instead of a `for` loop?

parsedTweets = jsonArray.map { (tweetDict) -> ParsedTweet in
let userDict = tweetDict[“user”] as NSDictionary
return ParsedTweet(
tweetText: tweetDict[“text”] as String?,
userName: userDict[“name”] as String?,
createdAt: tweetDict[“created_at”] as String?,
userAvatarURL: NSURL (string: userDict["profile_image_url"] as String!))
}

2015-01-13It's slick, but we decided it's bad style to use map() to apply a closure to all members of an array, because map() is defined as returning an array (possibly of a different type), and this is implicit in its name, "map". It _works_ to discard the return, sure, but after conferring with our peers, we're uncomfortable with doing this in a beginners' book. We'd feel better if Swift would add a function that was explicitly defined as applying a closure to every member of an array, with no side-effects or expected return value, like the old -[NSArray enumerateMembersUsingBlock:] in Foundation / Objective-C.
144OK

In the section “Building Our Own Delegate”, we define a protocol with a single method signature. I’m left wondering what advantages there may be in [1] defining a delegate and passing an object reference and [2] passing in a closure with the proper type signature.

I’m not suggesting that the text is wrong to explore delegates, but because my natural inclination is to prefer simple functions over (unnecessary) object wrappers around functions, I’d love some discussion in the book as to how to choose one pattern over the other.

2015-01-17More of a strategic plan for the book itself, rather than a design/architecture consideration. As much as we see the delegation pattern in the Cocoa Touch frameworks, we thought it would be very valuable to show readers how to do this themselves. It may be that in a few years, when Apple starts making Swift-only frameworks, this pattern will fall out of fashion. But as we've always thought of this as a frameworks book and not a language book, we're going to prefer mimicking Apple's approaches when we think it's going to help familiarize readers with a ubiquitous pattern.
148TYPO

In second code sample on the page, there’s a superfluous comma at end of final statement.

2014-12-14
163TYPO

“but we can override to [sic] to take some interesting action”

2014-12-14
125SUGGEST

For Array and Dictionary type declarations, we can use a terser syntax:

Instead of:
Array<Dictionary<String, AnyObject>>

We can write:
[ [String:AnyObject] ]

2015-01-17
73ERROR

In the OCUnit and XCTest box, The text references XCTFail in the first sentence and again in the third paragraph and implies that we have seen it before, but in this version of the book, we have not.

2014-12-14
166TYPO

line 7 of code sample has a superfluous ‘;’

2014-12-14
168OK

In the code example which runs off the bottom of the page, how about using a “if let” to unwrap the `tweetIdString` Option? That way, you can’t obviate the need for a ‘!’ later.

2015-01-17That's certainly a valid way to do it. Since tweetIdString is a property, we sort of preferred the "if tweetIdString == nil then early return" logic at the top (rather than having to come up with a new name for the if-let, like "unwrappedTweetIdString"), and given that we've already testing tweetIdString against nil, we know that the force-unwrap is safe.
27ERROR

“With the Storyboard showing in the Editor area, go up to the toolbar and click the Assistant Editor button, which looks like a tuxedo.”

In the latest XCode the Assistant Editor button has two overlapping circles, and not a tuxedo.

2014-12-14
97TYPO

The following typo (we) should be changed from:


Eventually, we’ll we have an app that looks and feels like a real Twitter client.
—-

To:


Eventually, we’ll (or we will) have an app that looks and feels like a real Twitter client.
—-

2014-12-14
178SUGGEST

In the phrase “control-drag down to the orange box”, rather than “down”, I’d say “up”, since you’re going up the screen.

2014-12-14
179ERROR

Substitute “println()” in place of “NSLog()”.

2014-12-14
101TYPO

When creating the custom table cell the menu option should be FileNew>File…

2014-12-14
92OK

When I run the code from the previous page and delete the twitterWebView declaration, I get a build error in WebViewTests.swift: “ViewController does not have a member named twitterWebView”. I get this even if I use Product|Build For|Running.
I think this is new to XCode 6.1.1. I am running through Beta 3 from the beginning on a fresh project.

2014-12-14You may have missed a step at the top of p.92: "Finally, with no twitterWebView, there’s no need for the WebViewTests test class, so delete that entire file."
97ERROR

XCode wants “cell.textLabel.text = parsedTweet.tweetText” to be “cell.textLabel?.text = parsedTweet.tweetText”. I presume this is because cell.TextLabel is a String?.

2014-12-14
102ERROR

Xcode wants “cell.textLabel.text = parsedTweet.useName” to be “cell.textLabel?.text = parsedTweet.useName”. I also notice that if I change “cell.detailtextLabel!.text = parserTweet.tweetText” to “cell.detailtextLabel?.text = parserTweet.tweetText” everything still works.

2014-12-14
106OK

dequeueReusableCellWithIdentifier(“CustomTweetCell”) should be dequeueReusableCellWithIdentifier(“ParsedTweetCell”). Figure 49 should also be updated.

2014-12-14ParsedTweetCell is the name of the class, but we've used the identifier String "CustomTweetCell" in the code and the storyboard, I guess because we were introducing custom table cells in this section and wanted to call attention to that. And it doesn't hurt to know that the class identity (set in the identity inspector, option-cmd-3) is different from the identifier string (set in the attribute inspector, option-cmd-4).
115TYPO

typealias is repeated

2014-12-14
28TYPO

for the IBAction of the Tweet button, it says the name should be “handleTweetButtonTapped()”. The action name should not have parentheses, should be “handlTweetButtonTapped”.

2014-12-14
119ERROR

I think that "request.performRequestWithHandler ( {

- (NSData data, NSHTTPURLResponse urlResponse, NSError error) -> Void" should be request.performRequestWithHandler ( {
- (data: NSData!, urlResponse: NSHTTPURLResponse!, error: NSError!) -> Void

2014-12-14
128OK

Array walking code lines 6 and 8 produce errors" “NSDictionary? does not have a member named ‘subscript’. Resolved this with ! operator, like so: useDict![”name“] and userDict![”profile_image_url"].

2014-12-14Not seeing this in Xcode 6.1.1. Can you check your code against the download for example 7-1 and follow up in the forums? Thanks.
129TYPO

The following text is obsolete: “At first our table contains the three dummy values from before, then we see
in the Xcode window as the app logs the raw JSON and its array-of-dictionaries representation. And then it just sits there.” The code was removed on p127

2014-12-14
102OK

The following instruction does not appear to be valid for my version of Xcode (Version 6.1.1 (6A2008a)):


Select the “Table View Cell”, visit its Attributes Inspector (Option+Command+4), and set its
style to “Subtitle”.
—-

The style “Subtitle” does not appear as an option. I only see two options: (1) Plain and (2) Grouped. Should “Subtitle” be another option, or am I not looking in the correction place?

Additionally, the instruction that follows:


Then, for the “Identifier”, we need a string value that we
can use to fetch this cell from our code. Let’s use “UserAndTweetCell”.
—-

There is no “Identifier” in the Attribute Inspector. Am I missing something?

2014-12-14It sounds like you have selected the table for editing, not a table cell. Please follow up in the forums if this is still a problem.
188SUGGEST

The app starts with the detail view showing default text. Perhaps it show the first tweet or you could indicate how this is resolved later.

Also, minor item maybe to be left as an exercise for the reader. I’ve been entering the code changes from the start of B3. At this point the app still displays a section header (“Section 1”) which can be fixed by returning nil from RootViewController’s tableView(titleForHeaderInSection:) or deleting it.

2015-01-15
204ERROR

On lines two and three of prepareForSegue, “segue!.identifier” should be “segue.identifier”. The current version produces the error: “Operand of postfix ‘!’ should have optional type: type is UIStoryboardSegue”.

2015-01-13
209TYPO

para 2, “@class” should be “class”.

2014-12-14
118TYPO

Line 8 should read
(Bool granted, NSError error)
not
(granted: Bool, error: NSError)
to stop a compiler error with Xcode 6.1.1

2014-12-14
116TYPO

line should read
(Bool granted, NSError eror)
not
(granted Bool, error: NSError)
to stop Xcode 6.1.1 compiler error

2014-12-14
211SUGGEST

I was briefly confused by “Select the tap gesture recognizer icon from the scene’s object list or the title bar under the scene”. In Interface Builder Help: Building User Interfaces, Apple refers to this as the “scene bar at the top of the scene”.

2014-12-14
229ERROR

Inconsitent method name: In the code you have “@IBAction func unwindToSizeClassOverridingVC (segue: UIStoryboardSegue) {}”; in para 4, the method name is “unwindToSizeClassOverrideVC()”. I prefer the latter.

2014-12-14
113ERROR

Page 113 says “enter a height of 100” but page 115 says to set the height to 125. I assume that page 113 should say 125.

2014-12-14
233TYPO

Here we “Name the file KeyboardViewControllerStoryboard.storyboard”. On page 235 we set property list value NSExtensionMainStoryboard to PragmaticTweepsKeyboard.

2014-12-14
237ERROR

cell.textLabel.text = “@\\(self.tweepNames[indexPath.row])” causes error “‘UILabel?’ does not have member named text. Change to ”cell.textLabel.text" to “cell.textLabel?.text”

2014-12-14
248ERROR

There is a discrepancy in the code in figure 106 and the code in RootViewController. “let jsonString…” is in TweetDetailViewController and UserDetailViewController, but not in RootViewController. This remark also applies to figure 109 on p250 and to “Dead Objects Tell No Tales” on p255.
In general I found this chapter useful easy to follow.

2014-12-14
116TYPO

Figure 116 “Show tab named Console in active window” differs from the text on p258 ‘In the text box, name it something appropriate, like “Debugging.” ’

2014-12-14
259TYPO

Figure 116 “Show tab named Console in active window” differs from the text on p258 ‘In the text box, name it something appropriate, like “Debugging.” ’

2014-12-14
194ERROR

The description and image of the “Container View” icon in the object library is incorrect, both describe/show the “View” object instead.

The container view icon is a grey box inside a white box inside a grey box.

2014-12-14
18TYPO

I presume “we see see our changes” is not intentional.

Also, the “2 times” label is not showing up on Xcode 6.1.1

2015-01-13
96OK

Twitter has changed the url for the new user “egg” icon. I had to use

aitchteeteepeeess:abs.twimg.com/sticky/default_profile_images/default_profile_6_normal.png

It would probably be better if the book didn’t depend on the “kindness of strangers” and used urls that pragprog rather than a 3rd party had control over.

2015-01-13The URL in the book works for me. Your point about relying on things like this to not change is valid, though of course, we've taken a risk basing the whole book on the Twitter API.
174OK

In the third code block, the twiterParams are incorrect. The twitter api requires both user_id and screen_name parameters, although it allows the value of the screen name to be used as the user_id

So
let twitterParams = [“screen_name” : screenName!]

should be
let twitterParams = [“screen_name” : screenName!, “user_id” : screenName!]

2015-01-13According to the Twitter REST API documentation (https://dev.twitter.com/rest/reference/get/users/show), either the user_id or screen_name is required. They're both marked as required, but the description clearly says that's it's a matter of sending either.
126TYPO

the array contains at least Twitter account
->
the array contains at least one Twitter account

2015-01-13
119SUGGEST

request.performRequestWithHandler ( {
(NSData data, NSHTTPURLResponse urlResponse, NSError error) -> Void in self.handleTwitterData(data, urlResponse: urlResponse, error: error)
})

can be written simpler as:

request.performRequestWithHandle(self.handleTwitterData)

2015-01-15Chris Adamson says: It's a neat trick, but we don't think our first couple closure examples are the place to introduce Swift's powerful-but-weird syntactic sugar.\t
127SUGGEST

var parsedTweets : Array = []
can be written shorter as:
var parsedTweets : [ParsedTweet] = []

2015-01-17
139TYPO

In fact, take out the println()s… these were removed on P135 (pdf)

2015-01-13
116ERROR

The closure format shown on page 116 was refusing to compile. I finally found a more terse syntax which worked properly:

cl.ly/image/27113i1I3L1G

This form doesn’t let me add links, but just an http.

P.S. This book is amazing!

2015-01-13We think the compile error here is fixed by making the NSError argument to the closure be an optional, which is how it's defined in in the docs for requestAccessToAccountsWithType()… follow the link in the docs to \nACAccountStoreRequestAccessCompletionHandler. Adding the missing "!" to NSError fixes the problem for us.
125TYPO

The following compilation error is produced:
—-
Extra argument ‘completion’ in call
—-

Due to this block of code in the text:


1 func reloadTweets() {

- let accountStore = ACAccountStore()

- let twitterAccountType = accountStore.accountTypeWithAccountTypeIdentifier(

- ACAccountTypeIdentifierTwitter)
5 accountStore.requestAccessToAccountsWithType(twitterAccountType,

- options: nil,

- completion: {

- (granted: Bool, error: NSError) -> Void in

- if (!granted) {
10 println (“account access not granted”)

- } else {

- println (“account access granted”)

- }
- })
15 }
—-

The error is resolved, by modifying line: 8 to read:


- (granted: Bool, error: NSError!) -> Void in
—-

Forced unwrapping NSError resolved the error.

2015-01-13
201TYPO

In “One thing we don’t see here is how the gesture recognizer is related to the image view. For that, go to the connections inspector (Alt-Cmd-7). ”

It should be Alt-Cmd-6

Sorry too lazy to figure out how to use the graphics for alt and 7 here

2015-01-13
205OK

The photo is wrong! The TARDIS is supposed to be bigger in the inside!

Sorry, couldn’t resist.

2015-01-13Janie used psychic paper on page 205 to not alarm the public.
3926ERROR

After adding constraints to the link just like I did with the label, I didn’t get a blue box, still stayed orange indicating I need another constraint.

I’m using Version 6.1.1 (6A2008a) OSX 10.10.1 (14B25)

2015-01-15
190OK

When starting to collapse and restore split views the RootViewController’s tableView(didSelectRowAtIndexPath:) breaks down. Suddenly there are cases with two view controllers where the second one is NOT a navigation controller and since that is the assumption in the code the selection is never handled and the app stops responding until the device is rotated.

2015-01-18I think this is what we handle on pages 191-2, where we finish out the tableView(didSelectRowAtIndexPath:) method. If that's not what you're seeing, let's follow up on the forum, where we will have more room to go back and forth than in an erratum. Thanks.
131SUGGEST

You could perhaps mention that “() -> Void in” is superfluous at the start of a closure so that all the calls to dispatch_async can be simplified. For example,

dispatch_async(dispatch_get_main_queue(), {
() -> Void in
self.tableView.reloadData()
})

becomes

dispatch_async(dispatch_get_main_queue(), {
self.tableView.reloadData()
})

A small matter but I find that it improves readability.

2015-01-17
8978OK

Copy and paste of the WebViewTest.swift gives me an error in the compiler: “Use of undeclared type of ViewController”.

I think you need to add a step in the view controller where you include the target tests

2015-01-18Did you perform the step on page 77 to "import PragmaticTweets" at the top of WebViewTests.swift? If that line is missing, you'll see that error you cite, and this should be the only step you need to get the test running (you do not need to add PragmaticTweetsTests.swift to the PragmaticTweets target, nor ViewController.swift to the PragmaticTweetsTests target)
210SUGGEST

Maybe you could explain that the name of an enum can be omitted when referring to one of its values so that

if sender.state UIGestureRecognizerState.Began || sender.state UIGestureRecognizerState.Changed {

becomes

if sender.state .Began || sender.state .Changed {

I find that the latter exposes the intent far better than the former.

2015-01-17
9989SUGGEST

“The careful proportioning of responsibilities between the view class and the controller …”
How about changing “proportioning” to “apportionment”?

2015-01-13
228SUGGEST

“Since we want to send a tweet, we can enter twitter as the
search term, and we’ll find a whole “Twitter Framework
Reference”. Tempting, but take it from us that that’s old
news — it was a Twitter-only framework for iOS 5 that has
been supplanted by a new framework that works with multiple
social networks."

This tells the reader that the docs are not helpful for
finding the best framework. It would be be nice to have
some guidance as to find appropriate frameworks in future.
How should we do it? Google? Buy a recent book of recipes?
Email the authors of this book?

2015-01-13Somewhat fair point, though I don't think documenting a valid API that has a superior alternative makes the docs "not helpful". And frankly, we're trying to take the user's POV in searching for a term of interest and seeing what comes up, rather than just pull magic APIs out of our hat for 300 pages.
122ERROR

The text instructs: “Run this, tap “Show My Tweets” and check the console at the bottom of the Xcode window" but we no longer have a “Show My Tweets” to tap.

Suggested correction:

“Run this and check the console at the bottom of the Xcode window.”

2015-01-15
91ERROR

I tried the code but got an error.
This seems to fix it:
stackoverflow.com/questions/25964901/6-0-1-and-table-changes-uilabel-does-not-have-a-member-named-text

2015-01-13
10797ERROR

As above, cell.textLabel.text = parsedTweet.userName gives an error
but putting in an ! seems to clear the error
cell.textLabel!.text = parsedTweet.userName

2015-01-13
249TYPO

In the sentence:

change the URL it uses, like this:
Debugging/PragmaticTweets-14-1/PragmaticTweets/RootViewController.swift
let twitterAPIURL = NSURL.URLWithString(

Error message: ‘URLWithString’ is unavailable: use object construction ‘NSURL (string:)’

the original code was:
let twitterAPIURL = NSURL(string:

2015-02-08
254SUGGEST

It might be worth mentioning setting the active schema back to PragmaticTweets from PragmaticTweepsKeyboard to prevent questions on why are breakpoints not working.

2015-02-09We did mention this back on page 241, when allowing Xcode to switch to the PragmaticTweepsKeyboard scheme: "We can always switch back to the main app with the scheme selector, next to the stop button on the toolbar." We'll beef that line up a little bit for the next beta.
0SUGGEST

Sorry all my page references are from the Mac Preview app page numbering and not the page number printed top right corner. Here are the corrections:
139 = 131
249 = 246
254 = 251

2015-02-08
423ERROR

When describing the transformations for two-sided print the scaling is said to be 50. This would allow four pages on one sheet. For A4 paper the factor is 1/sqrt(2) or about 71. I’m sure for letter size it is similar.

2015-02-08
425ERROR

In transformations if a, b, c, and d are all set to the same value the result is NOT a scaling. For an aspect preserving scale a and b need to be equal and c and d must be 0.

2015-02-08Actually, the way Quartz uses the matrix, it's a and d that change for a scaling transform, and b and c that remain 0. But you're right, definitely not all four. \n \nAlso, where are you getting your page numbers from? Our PDF doesn't have 425 pages. Kindle location or iBooks page number for a given font size?
444ERROR

Here too the identity transformation matrix should be a=b=1, c=d=0, tx=ty=0. If c and/or d had a value of 1 the transform would include some amount of rotation/stretching.

2015-02-08With Apple's formula, it's a=d=1 and b=c=0, but otherwise correct. Thanks.
265TYPO

In ‘Dead Objects Tell No Tails’, you write:
For example, continue after the breakpoint, then set the breakpoint right after the line let jsonString = NSString (data: data, encoding:NSUTF8StringEncoding). Now pull-to-refresh to hit the breakpoint again.

this line does not exist, instead you could ask them to expand data and right click on _bytes which will produce the result you are looking for.

jsonString only exists in the detail views

2015-02-09Yeah, jsonString was our own debug and shouldn't have made it into the book at all. Moreover, the timing of ARC's destruction of an unreferenced object seems unpredictable, so I don't think we want this sidebar anymore, as the behavior is not always reproducible.
232ERROR

The final paragraph of the App Lifecycle section states:

“If our app is backgrounded long enough, it will eventually be terminated. We’ll get this message via the app delegate’s applicationWillTerminate() method. If our app needed to save data for the next time it’s launched, this would be our last chance to do so.”

As far as I understand it, that’s not always the case. When an app is backgrounded, the OS can silently move it into a suspended state and then terminate it which will not call applicationWillTerminate(). It may be worth mentioning that in case people become confused about that function not always getting called.

2015-02-09
66TYPO

“One other thing to watch for is orange markers indicating that an object it not in its correct position. ”

Thinking this should be: s/it not in/is not in/

2015-02-08
76ERROR

presentViewController vs self.presentViewController: page 76 has the former, page 77 describes the latter and figure 20 shows the self prefix in the screenshot.

2015-02-08
100TYPO

“Select Storyboard.main and again switch to the Assistant Editor.” should (perhaps?) be “Select Main.storyboard …”

2015-02-08
65TYPO

‘click the “Localized…” button’ should be ‘click the “Localize…” button’ (omit the ‘d’). It’s correct a few sentences later. [Note, unlike my earlier reports where the pagenum was erroneously taken from the (variable) epub, this page number is from the pdf]

2015-02-08
66TYPO

Tap “J’ai fini le projet” should be Tap “Envoyer Tweet”.

2015-02-08
74ERROR

“As we saw earlier, the method in XCTest to assert a failure is XCTFail” - except that we haven’t seen XCTFail at all yet…

2015-02-08
5033TYPO

“Finally, if canSendTweet() returned false”

A `canSendTweet()` function is never defined and used in `
UserInterface/PragmaticTweets-2-1/PragmaticTweets/ViewController.swift`.

2015-02-08
5336TYPO

“We connected an outlet from the code to the UILabel in the storyboard…”

This task never happens in chapter 2.

2015-02-08
6750SUGGEST

“…Swift lets us chain the results of one statement as parameters to another…”

This is better described as function composition rather than [method] chaining.

2015-02-08
149134SUGGEST

Switch old GCD constants (DISPATCH_QUEUE_PRIORITY_DEFAULT) to new QOS constants (QOS_CLASS_DEFAULT).

2015-02-09
273ERROR

You have:

Our first commit has set up the Git repository with initial versions of all the project files. Let’s make a change and see what that looks like.

At this point you have not checked out the project from git…

2015-03-02
282ERROR

This page references TN2250 which is now “retired”. It appears to be superseded by TN2407.

2015-03-10Thanks for the update. But oh my goodness, TN2407 is so worthless! It's 1/10 the length of TN2250, and its mid-section is basically a list of possible problems with no guidance on how to resolve them. Apple might as well have said "beats us, go look it up on Stack Overflow, I guess."
62OK

Re the following text, is this really a “logic error” or rather a poor “business rule”? Those are different.

“Unit tests also expose logic errors in our code. In the Jurassic Park example, the code being run had a logic error that prevented the scientists from discov- ering the problem until it was too late.”

2015-04-13The point of unit testing is to see if your code behaves the way you expect. I have found that often business decisions have very little to do with this process.
86TYPO

unintended use of semicolons… Swift can handle semicolons just fine so the code will run but I am sure the author did not intend on including them.

2015-04-13
89TYPO

Repeated statement.

From Top of page 89 (after code block):

"Also, go ahead and delete the titleForHeaderInSection() method; we’ll only have a single section from here on, so the title is superfluous.

In this new version, we have a single section (and therefore can eliminate the entire tableView(titleForHeaderInSection) method), and the number…"

2015-04-13
92ERROR

As of Xcode 6.3 (6D554n), Xcode complains about this line:

let cell = tableView.dequeueReusableCellWithIdentifier(“UserAndTweetCell”) as UITableViewCell

xcode suggests:

let cell = tableView.dequeueReusableCellWithIdentifier(“UserAndTweetCell”) as! UITableViewCell

2015-04-13Any cast using "as" that can fail now has to be written as "as!" in Swift 1.2 / Xcode 6.3. Next update of the book will be all about these Swift 1.2 changes (there's probably 20-30 places where we need an "as!"). But give us a sec… Xcode 6.3 isn't even final as I write this.
54TYPO

The code presented here isn’t quite what we did in the previous chapter. Specifically, it adds in the optional prefixing “self” on ln6, which wasn’t in the chapter 2 sample code. Since it then goes on to say it’s not necessary and we won’t be doing it in future, it’s pretty much a wash, but it does tell us not to do something we weren’t doing in the first place

165ERROR

Seems like twitter has changed the default profile image urls. The provided one doesn’t work for me, but the ones in the twitter dev best practices still do. PragProg won’t let me paste a URL here.

159SUGGEST

Segue unwinding <>

Silly me. I chased this for 15 minutes because in my simpleton mind, I assumed that the unwind functionality for the UserDetailViewController would live in the — well: UserDetailViewController class (especially when seeing the drag within the context of the User Detail View Controller of the storyboard). After actually reading the book and cruising through the Apple Documentation, I found that it needs to be in the TweetDetailViewController (not entirely self evident to us novices).

Suggestion: emphasize in the text that it goes in the TweetDetailViewController — perhaps even has Joe Ask “Why does it belong in the TweetDetailViewController and not in the UserDetailViewController?” (he’s a pretty smart guy)

180TYPO

Sentence at middle of page:

But to show how flexible gesture recognizers, we’ll do functionally the same thing by giving the existing image view the ability to handle taps, thereby turning it into a de facto image button.

needs grammar correction:

But to show how flexible gesture recognizers are, …

or, perhaps:

But to show the flexibility of gesture recognizers, …

232SUGGEST

Nit: Yes, I know it should be obvious by now, but…

In the second sentence of the first full paragraph on the page, you tell us noobs to “Run the app” so we can jump into the debugger. Yes, you’ve implicitly changed the context by having us edit the RootViewController, and yes, that is NOT part of the keyboard extension that we were working in the last chapter, but…

I suggest that you put in a reminder to switch context back to “Pragmatic Tweets” so fools like me who are powering through the book like someone lost in the desert getting his/her first drink of water after a few days wandering won’t wonder why the keyboard extension came up. :)

237TYPO

Second paragraph from the bottom, first line reads (“D” below is the command key symbol as translated by copy/paste from Preview into this text box):

Go to Xcode→Preferences or press D to access the Preferences window.

I think you mean to bring up Preferences.

250SUGGEST

Last paragraph on page opens with:

Prior to running, let’s take a look at how all these app-signing pieces have come together. Click the project icon in the project window, select the Prag- maticTweets target, and choose the Build Settings tab.

::woof:: took a bit to grok what you meant by “project window”. You might try:

Prior to running, let’s take a look at how all these app-signing pieces have come together. In the Project Navigation window (<1>), select eh Pragmatic Tweets target, and choose the Build Settings tab.

24ERROR

“go up to the toolbar and click the Assistant Editor button, which looks like two linked circles”

The Assistant Editor icon no longer looks like two linked circles. It looks like the front jacket of a butler (“the smart assistant”?)

Just to be sure, I got curious and verified that it used to look like two linked circles, but no longer does, by checking some Google images of the old Xcode.

24ERROR

Please ignore the report for #78465 - after updating to the latest Xcode, it now has 2 circles instead of the “valet” icon.

123ERROR

There is no such statement in my ViewController.swift file:
if parsedTweet.userAvatarURL != nil

696TYPO

The page number is the Kindle location number. “Calling Up the SLComposeViewController” - I discovered that you need to add “import Social” in order to get the code to work.

220TYPO

In the section titled “Implementing the Next Keyboard Button”, the second sentence incorrectly refers to “KeyboardViewControllerStoryboard.storyboard”.
The correct name is “PragmaticTweepsKeyboard.storyboard”.

22ERROR

In Chapter 1, Xcode Playgrounds section, this paragraph is no longer the case:

“This makes the evaluation pane update again, but it just says “(2 times).” That tells us that it has executed these two lines of code. But it doesn’t give us a preview of the result, because evaluating these lines doesn’t give a different result for myLabel. We haven’t replaced myLabel; we’ve just changed what it looks like.”

Rather than showing “(2 lines)”, it does now show each individual line with the ‘Quick Look’ eye icon and also the ‘Result’ dot icon. (This is in Xcode Version 7.1.1 (7B1005), on El Capitan 10.11.1).

4ERROR

Please disregard previous errata I submitted, I put the wrong PDF page number. It should be page 4 of the PDF, not page 22.

In Chapter 1, Xcode Playgrounds section, this paragraph is no longer the case:

“This makes the evaluation pane update again, but it just says “(2 times).” That tells us that it has executed these two lines of code. But it doesn’t give us a preview of the result, because evaluating these lines doesn’t give a different result for myLabel. We haven’t replaced myLabel; we’ve just changed what it looks like.”

Rather than showing “(2 lines)”, it does now show each individual line with the ‘Quick Look’ eye icon and also the ‘Result’ dot icon. (This is in Xcode Version 7.1.1 (7B1005), on El Capitan 10.11.1).—Steve Holland

26TYPO

In the Coding the App - Logging section, the code example uses:

println (“handleTweetButtonTapped”)

In Xcode Version 7.1.1 (7B1005), this function has been renamed to ‘print’, so the example should now be:

print (“handleTweetButtonTapped”)

Categories: