Errata for Swift Apprentice v3 (Swift 4 Edition)

This topic is for bugs, typos, and other mistakes in Swift Apprentice v3

Page 7, about the editors, Ray Fix
“he is actively Swift to create Revolve”

is there a verb missing between actively and Swift?


Page 12
“We’ve set up an official forum for the book at .raywenderlich.com. ”

extra period before the URL

Page 12
“Since you’ve purchased the PDF version of this book, ”

should it be updated to a broader descriptor, now that the eBook is PDF and ePub as well?

The number list for the mini exercises and challenges are out of order sometimes 1 comes after 2, madness :joy: but I am only up to chapter 4 and they are all affected up to that point, I will check the rest out and make a list when I get a chance.

Page 208 - wrong number in heading for Chapter 12

page 215 - note last sentence → “you’ll create a more the robust version.” - need to remove the

p381 - incorrect / bad English → Although you both objects go out of scope deinitializers never get called and nothing …–> Although both objects go out of scope, the deinitializers never get called and nothing …

all the chapter numbers are wrong for source code, challenges and mini-exercises

page 396 →
var x = MysteryType()
var y = x
exposeValue(x) // => initial value derived from x
// {code here which uses only y}
exposeValue(x) // => final value derived from x
// Q: are the initial and final values different?

Page 158-159: I don’t known if is a change in Swift4 or XCode 9 but I obtain 5 in but cases when print unicodeScalars. The foreach shows 5 codes in both cases too.

Page 174, Chapter 9, Strings. The text and example:

.

Should not the binary UTF-8 code be 11000010 10111101 ? Or is the “following diagram” nothing to do with the previous "½’ character?

Page in PDF version should be 168-169. And yes, get the same as you.

If you past the code directly from the PDF text you get what you found, 5 for both cases for unicodeScalars. However if you do the following:
var cafeNormal = “café”
var cafeCombining = “cafe\u{0301}”
cafeNormal.count // 4
cafeCombining.count // 4
cafeNormal.unicodeScalars.count // 5
cafeCombining.unicodeScalars.count // 5
cafeNormal = “caf\u{00E9}”
cafeCombining = “cafe\u{0301}”
cafeNormal.count // 4
cafeCombining.count // 4
cafeNormal.unicodeScalars.count // 4
cafeCombining.unicodeScalars.count // 5

It then works fine. Pasting directly from the PDF does not presumably translate directly into the individual e acute unicode character.

Yes, that is the problem. Thanks

Chapter 23: Asynchronous Closures and Memory Management

title: Unowned references

This do block:

do {
     let author = Author(name: "Cosmin")
     let tutorial = Tutorial(title: "Memory management", author: author)
     author.tutorials.append(author)
}

should be:

 do {
    let editor = Editor(name: "Ray")
    let author = Author(name: "Cosmin")
    let tutorial = Tutorial(title: "Memory management", author: author)
    tutorial.editor = editor
    author.tutorials.append(tutorial)
    editor.tutorials.append(tutorial)
 }

@freedom Thank you for pointing this one out - much appreciated. We will definitely go ahead and fix it in the book’s next update.

Chapter 25: Protocol-Oriented Programming

title: Traits, mixins, and multiple inheritance

The first word after the code block should be NewHockeyRecord, but not HockeyRecord

Chapter 23:
Page 737 In side the Editor class “Goodbye Author (name)!” should be “Goodbye Editor (name)!”

@mobetta Thank you for pointing this one out - much appreciated. We will definitely go ahead and fix it in the book’s next update.

Chapter 16: Page 436
“You follow the name of the named type with a semicolon and …”
It should be “colon”

This topic was automatically closed after 166 days. New replies are no longer allowed.