# Errata for iOS Apprentice v4.1

**URL:** <https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43>\
**Category:** iOS Apprentice\
**Created:** [February 19, 2016, 5:18pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43 "2016-02-19T17:18:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rwenderlich](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rwenderlich/32/108604_2.png) [@rwenderlich](https://forums.kodeco.com/u/rwenderlich)\
**Post date:** [February 19, 2016, 5:18pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/1 "2016-02-19T17:18:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rwenderlich](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rwenderlich/32/108604_2.png) [@rwenderlich](https://forums.kodeco.com/u/rwenderlich)\
**Post date:** [February 19, 2016, 5:19pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/2 "2016-02-19T17:19:03Z")

</div>

Pinned on February 19, 2016, 5:19pm UTC



---

<div class="post-metadata">

**Author:** ![rwenderlich](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rwenderlich/32/108604_2.png) [@rwenderlich](https://forums.kodeco.com/u/rwenderlich)\
**Post date:** [February 28, 2016, 9:03pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/3 "2016-02-28T21:03:36Z")

</div>

Archived errata threads:

- [http://archive.raywenderlich.com/forums/viewtopic.php?f=10&t=23252](http://archive.raywenderlich.com/forums/viewtopic.php?f=10&t=23252)
- [http://archive.raywenderlich.com/forums/viewtopic.php?f=11&t=23253](http://archive.raywenderlich.com/forums/viewtopic.php?f=11&t=23253)
- [http://archive.raywenderlich.com/forums/viewtopic.php?f=12&t=23254](http://archive.raywenderlich.com/forums/viewtopic.php?f=12&t=23254)
- [http://archive.raywenderlich.com/forums/viewtopic.php?f=14&t=23255](http://archive.raywenderlich.com/forums/viewtopic.php?f=14&t=23255)

---

<div class="post-metadata">

**Author:** ![linc](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/linc/32/37624_2.png) [@linc](https://forums.kodeco.com/u/linc)\
**Post date:** [April 28, 2016, 9:04am UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/4 "2016-04-28T09:04:53Z")

</div>

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:

> **[Core Data Programming Guide: What Is Core Data?](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CoreData/index.html)**
>
> Explains how to manage objects using the Core Data framework.

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

---

<div class="post-metadata">

**Author:** ![hollance](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hollance/32/109009_2.png) [@hollance](https://forums.kodeco.com/u/hollance)\
**Post date:** [April 28, 2016, 11:56am UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/5 "2016-04-28T11:56:31Z")

</div>

Thanks for the head’s up, @linc.

---

<div class="post-metadata">

**Author:** ![linc](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/linc/32/37624_2.png) [@linc](https://forums.kodeco.com/u/linc)\
**Post date:** [June 4, 2016, 7:03pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/6 "2016-06-04T19:03:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![csweigart](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/csweigart/32/85444_2.png) [@csweigart](https://forums.kodeco.com/u/csweigart)\
**Post date:** [June 7, 2016, 7:23pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/7 "2016-06-07T19:23:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jaure](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jaure/32/79544_2.png) [@jaure](https://forums.kodeco.com/u/jaure)\
**Post date:** [June 21, 2016, 9:43am UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/8 "2016-06-21T09:43:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hollance](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hollance/32/109009_2.png) [@hollance](https://forums.kodeco.com/u/hollance)\
**Post date:** [June 21, 2016, 10:15am UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/9 "2016-06-21T10:15:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![csweigart](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/csweigart/32/85444_2.png) [@csweigart](https://forums.kodeco.com/u/csweigart)\
**Post date:** [July 4, 2016, 4:38pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/10 "2016-07-04T16:38:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hollance](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hollance/32/109009_2.png) [@hollance](https://forums.kodeco.com/u/hollance)\
**Post date:** [July 5, 2016, 3:31pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/11 "2016-07-05T15:31:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![technickel](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/technickel/32/46797_2.png) [@technickel](https://forums.kodeco.com/u/technickel)\
**Post date:** [November 6, 2016, 6:06pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/13 "2016-11-06T18:06:39Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![hollance](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hollance/32/109009_2.png) [@hollance](https://forums.kodeco.com/u/hollance)\
**Post date:** [November 7, 2016, 9:25am UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/14 "2016-11-07T09:25:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hanekomu](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hanekomu/32/5541_2.png) [@hanekomu](https://forums.kodeco.com/u/hanekomu)\
**Post date:** [November 16, 2016, 3:32pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/15 "2016-11-16T15:32:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bart\_jan](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/bart_jan/32/95932_2.png) [@bart\_jan](https://forums.kodeco.com/u/bart_jan)\
**Post date:** [October 22, 2017, 4:40pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/16 "2017-10-22T16:40:57Z")

</div>

as of 2017-10-22 the server [archive.raywenderlich.com](http://archive.raywenderlich.com) cannot be found.

---

<div class="post-metadata">

**Author:** ![fahim](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/fahim/32/110943_2.png) [@fahim](https://forums.kodeco.com/u/fahim)\
**Post date:** [October 23, 2017, 4:10pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/17 "2017-10-23T16:10:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![nosov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nosov/32/105256_2.png) [@nosov](https://forums.kodeco.com/u/nosov)\
**Post date:** [April 26, 2019, 3:02pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/18 "2019-04-26T15:02:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [May 1, 2019, 10:30pm UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/19 "2019-05-01T22:30:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![juliargilbert](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/juliargilbert/32/82757_2.png) [@juliargilbert](https://forums.kodeco.com/u/juliargilbert)\
**Post date:** [May 27, 2019, 10:54am UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/20 "2019-05-27T10:54:19Z")

</div>

Thanks for sharing and this is so helpful for me.

---

<div class="post-metadata">

**Author:** ![omghavefun](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/omghavefun/32/106694_2.png) [@omghavefun](https://forums.kodeco.com/u/omghavefun)\
**Post date:** [December 21, 2019, 9:40am UTC](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43/21 "2019-12-21T09:40:34Z")

</div>

Hi,  
iOS Apprentice,

1. 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**

1. Chapter 2 / The last paragraph

> **WH** ile this app responds only to touch

should be

> **Wh** ile this app responds only to touch

1. Chapter 3 / “Adding padding”

> The set of edges to pad… **.leadingand** trailing

should be

> The set of edges to pad… **.leading and** trailing

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

[Next page](https://forums.kodeco.com/t/errata-for-ios-apprentice-v4-1/43.md?page=2)
