This topic is for bugs, typos, and other mistakes in iOS Apprentice v4.1.
Archived errata threads:
Thanks for the great tutorials.
In the MyLocations tutorial on the last page (p.292) the Core Data Programming Guide by Apple is linked. The URL has changed to:
Also the code samples in the guide are now both in Objective-C and Swift.
Thanks for the headās up, @linc.
Tutorial 4 āStore Searchā, page 125.
Not an error, but rather a change in Xcode (Iām using 7.3.1):
The key in info.plist is now called āApp Transport Security Settingsā.
And the key in the dictionary is now called āAllow Arbitrary Loadsā.
This message was sent to us via our customer support desk:
From: Yuelong Gong
Subject: Code correction
Hi, Iām new in iOS programming, and The iOS Apprentice is a great tutorial for beginners.
But I found a code issue in Checklist Cheaper, page 140 Loading file Part
If the Checklist.plist is exist and not empty, the code always stuck at
checked = aDecoder.decodeBoolForKey(āCheckedā)
So I have change the code to
checked = aDecoder.decodeObjectForKey(āCheckedā) as! Bool
Only change the code like this, the app can run functional.
My Xcode version is 7.3.1(7D1014), hope my advice will help other beginner solve their same problem.
Thanks
tableView(_:indentationLevelForRowAtIndexPath:) in Section 11, iOS Apprentice 2, Checklists, no longer works as āvarā parameters have been deprecated. Is there a fix?
You can write var indexPath = indexPath
at the top of the method. This makes a new local variable with the same value as the parameter.
Comment submitted by Morgan via our support desk:
Hey there Iām going through the Apprentice 2 Checklist app and I found a small error, page 39 the else if statement for index.row== 3 the pdf has row2checked in the nested if statement and it should be row3checked in that section.
That is an intentional error. The book actually asks you to find this bug.
I noticed on tutorial 1 that the example images have a target score number of 84 but the text says to try to get as close to 22 as possible. I see what the goal is but just wanted to report that. So far looks awesome and easy to retain lessons learned though!
Whoopsā¦ I updated the picture but not the text, it seems. Good catch!
In iOS Apprentice 2 (5.0), on page 67, it says ā3. inserted a new cell for it in the table view.ā. Shouldnāt that be āinserted a new rowā?
Marcel
as of 2017-10-22 the server archive.raywenderlich.com cannot be found.
Hi, thanks for the heads up. I believe this change was an intentional one that was made several months ago. Were you looking for something specific with those links?
Hello there!
In part Enable the Done button for edits for chapter 14. Edit Items you write to add to implementation of protocol:
Add the following to ChecklistViewController.swift and the compiler error will be history
func addItemViewController(
_ controller: AddItemViewController,
didFinishEditing item: ChecklistItem) {
if let index = items.index(of: item) {
let indexPath = IndexPath(row: index, section: 0)
if let cell = tableView.cellForRow(at: indexPath) {
configureText(for: cell, with: item)
}
}
navigationController?.popViewController(animated:true)
}
Unfortunately āindex(of:)ā is deprecated. Itās recommended to use firstIndex(of:) method.
@nosov Thank you for the heads up - much appreciated! We will fix this in the next edition of the book.
Thanks for sharing and this is so helpful for me.
Hi,
iOS Apprentice,
- Chapter 2 / āMaking the text bolderā part / Note: .semibold is the short versionā¦
Its full name is Font.Weight.bold
should be
Its full name is Font.Weight.semibold
- Chapter 2 / The last paragraph
WHile this app responds only to touch
should be
While this app responds only to touch
- Chapter 3 / āAdding paddingā
The set of edges to padā¦ .leadingand trailing
should be
The set of edges to padā¦ .leading and trailing
- Chapter 4 / āSimplifying the Alert codeā
ā Incorporate the new scoringMessage() method into the alert pop-uo codeā
should be
ā Incorporate the new scoringMessage() method into the alert pop-up codeā