Group Group Group Group Group Group Group Group Group

Errata for iOS Apprentice v4.1

#1

This topic is for bugs, typos, and other mistakes in iOS Apprentice v4.1.

1 Like
pinned #2
#3

Archived errata threads:

#4

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:
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreData/index.html

Also the code samples in the guide are now both in Objective-C and Swift. :slight_smile:

#5

Thanks for the head’s up, @linc.

#6

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”.

#7

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

1 Like
#8

tableView(_:indentationLevelForRowAtIndexPath:) in Section 11, iOS Apprentice 2, Checklists, no longer works as ‘var’ parameters have been deprecated. Is there a fix?

#9

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.

#10

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.

#11

That is an intentional error. :wink: The book actually asks you to find this bug.

1 Like
#13

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!

#14

Whoops… I updated the picture but not the text, it seems. Good catch! :smiley:

#15

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

#16

as of 2017-10-22 the server archive.raywenderlich.com cannot be found.

#17

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?

#18

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.

#19

@nosov Thank you for the heads up - much appreciated! We will fix this in the next edition of the book.

#20

Thanks for sharing and this is so helpful for me.