Errata

iOS 9 Programming Fundamentals with Swift

Errata for iOS 9 Programming Fundamentals with Swift

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

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

Version Location Description Submitted By Date submitted Date corrected
PDF
Page xii
4th paragraph

Extra "the" in "Objective-C, however, lacks the very the advantages that Swift offers."

Note from the Author or Editor:
Thanks, fixed in my copy

Peter Olsen  Sep 16, 2015  Sep 23, 2015
PDF
Page xix
1st paragraph

Link needs to be updated for iOS 9 in "You can access this page at http://bit.ly/ios8-prog-fundamentals."

Note from the Author or Editor:
I'll have to contact Production about this.

Peter Olsen  Sep 16, 2015  Sep 23, 2015
PDF
Page 14
Last paragraph

Under the heading, Instances, after the code,
"But I don’t have actually have any Dog objects in my program yet."

The word "have" appears twice.

Note from the Author or Editor:
Great catch, thanks. Now fixed in my copy.

David Scott  Sep 23, 2015  Sep 23, 2015
PDF
Page 24
Last paragraph, before Instance Creation heading

What "wise programmer"? It says, "Thus, in real life, the “wise programmer” of whom I spoke a moment ago", but it seems out of the blue to me and I can't find where it was mentioned before.

Note from the Author or Editor:
Yes, nice catch. It looks like I had an earlier phrase that got deleted as I was tightening things up. I've rewritten like this: "Apple has thus done a great deal of thinking and planning on your behalf, before you ever write a single line of code! As a result, you will mostly use the object types that Apple has _already_ given you. You can _also_ create completely new object types, but proportionately you will do so far less than you will use the object types that exist already."

David Scott  Sep 24, 2015  Sep 23, 2015
PDF
Page 25
3rd paragraph

"Planning how you’re going create instances,"

The word "to" is missing between "going create".

Note from the Author or Editor:
correct, inserted "to" in my copy, nice catch

David Scott  Sep 24, 2015  Sep 23, 2015
Printed, PDF
Page 83
6th paragraph

~= is an operator, but not an assignment operator in "The shorthand (compound) assignment arithmetic operators are +=, -=, *=, /=, %=, &=, |=, ^=, ~=, <<=, >>=."

Note from the Author or Editor:
Thanks, good point. It really is only used in pattern matching.

Peter Olsen  Mar 05, 2016 
Printed, PDF
Page 91
The last paragraph example code

The last paragraph example code throws an error in Xcode.

The correct code is:
let arr = s.characters.split{$0 == " "}.map{String($0)}

Anatoliy Chernyuk  Aug 27, 2016 
PDF
Page 130
2nd to last paragraph

Do you mean "handy" in "but it’s a handly formulaic convenience"?

Note from the Author or Editor:
Already caught this one, thanks!

Peter Olsen  Sep 19, 2015  Sep 23, 2015
PDF
Page 132
2nd paragraph

There isn't a UIViewContentMode.None. It should probably be .Center in ".None is nicer than UIViewContentMode.None."

Peter Olsen  Sep 19, 2015  Sep 23, 2015
PDF
Page 134
5th code block

For consistency, the enum should be Error, not Error2 in "let fatalMaker = Error2.Fatal"

Peter Olsen  Sep 19, 2015  Sep 23, 2015
PDF
Page 206
2nd code block

When referring back to myMin<T>, it might be better to show the corrected version with the type constraint, rather than the version that doesn't compile.

Note from the Author or Editor:
I think this is a good suggestion. Easily done, as you say, just by adding the type constraint (and removing the comment). I'm a little reluctant on the one hand because it doesn't match the previous code, but it _does_ match the _following_ code (extension Array where Element:Comparable) and that's probably more important pedagogically.

Peter Olsen  Sep 24, 2015  Sep 23, 2015
PDF
Page 218
3rd code block

For consistency, there should be a "let" before "arr2 = arr[r] // [2,3]".

Note from the Author or Editor:
Agreed.

Peter Olsen  Sep 26, 2015 
PDF
Page 219
1st code block

Swift 1 global function startsWith not updated to Swift 2 in "let ok = startsWith(arr, [1,2]) // true".

Note from the Author or Editor:
Absolutely right, should be let ok = arr.startsWith([1,2]) // true

Peter Olsen  Sep 26, 2015 
PDF
Page 252
First code sample

The variable i is missing in,
for 10.stride(through: 0, by: -2) {

Note from the Author or Editor:
Absolutely right; I caught this independently and have corrected it in my copy (and in the online example on github)

CheolsuPark  Nov 06, 2015