# Errata for 2D iOS & tvOS Games by Tutorials v1.3

**URL:** <https://forums.kodeco.com/t/errata-for-2d-ios-tvos-games-by-tutorials-v1-3/14193>\
**Category:** 2D iOS & tvOS Games by Tutorials\
**Created:** [April 28, 2016, 3:43pm UTC](https://forums.kodeco.com/t/errata-for-2d-ios-tvos-games-by-tutorials-v1-3/14193 "2016-04-28T15:43:15Z")\
**Posts on this page:** 9\
**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:** [April 28, 2016, 3:43pm UTC](https://forums.kodeco.com/t/errata-for-2d-ios-tvos-games-by-tutorials-v1-3/14193/1 "2016-04-28T15:43:15Z")

</div>

This topic is for bugs, typos, and other mistakes in 2D iOS & tvOS Games by Tutorials v1.3.

---

<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:** [April 28, 2016, 3:43pm UTC](https://forums.kodeco.com/t/errata-for-2d-ios-tvos-games-by-tutorials-v1-3/14193/2 "2016-04-28T15:43:28Z")

</div>

Pinned on April 28, 2016, 3:43pm UTC



---

<div class="post-metadata">

**Author:** ![charles](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/charles/32/102075_2.png) [@charles](https://forums.kodeco.com/u/charles)\
**Post date:** [July 20, 2016, 1:22pm UTC](https://forums.kodeco.com/t/errata-for-2d-ios-tvos-games-by-tutorials-v1-3/14193/3 "2016-07-20T13:22:46Z")

</div>

I have asked a question there over a week ago with no reply

---

<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 3, 2017, 7:04pm UTC](https://forums.kodeco.com/t/errata-for-2d-ios-tvos-games-by-tutorials-v1-3/14193/4 "2017-02-03T19:04:45Z")

</div>

Bug report by Gionata R: "At page 424 you provide the source code that interprets the accelerometer’s input. This piece of code, in my case, had been generating a strong reference cycle with its parent class, so that when I wanted to transition into another scene, my GameScene’s deinit wouldn’t be called.

I solved the problem by adding the [unowned self] capture list before the parameter list “accelerometerData, error in”"

---

<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:** [February 25, 2017, 8:50pm UTC](https://forums.kodeco.com/t/errata-for-2d-ios-tvos-games-by-tutorials-v1-3/14193/5 "2017-02-25T20:50:18Z")

</div>

Submitted to our customer support desk by Billy:

Typo, 2D Apple Games, page 203

First, windWithTimer does not exist.  
Second, there shouldn’t be an ‘s’ after switchWindDirections(\_🙂

---

<div class="post-metadata">

**Author:** ![iavor](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/iavor/32/65145_2.png) [@iavor](https://forums.kodeco.com/u/iavor)\
**Post date:** [April 28, 2017, 1:18am UTC](https://forums.kodeco.com/t/errata-for-2d-ios-tvos-games-by-tutorials-v1-3/14193/6 "2017-04-28T01:18:21Z")

</div>

There is a typo in the following paragraph on page 90 of 2D Apple Games by Tutorials v.2.0:

> Here, you create the reverse of the actionMidMove and actionMove actions by calling reversed() on each, and **insert** them into the sequence.

**insert** should be **inserting**

---

<div class="post-metadata">

**Author:** ![dbourne](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/dbourne/32/81494_2.png) [@dbourne](https://forums.kodeco.com/u/dbourne)\
**Post date:** [May 11, 2017, 3:50pm UTC](https://forums.kodeco.com/t/errata-for-2d-ios-tvos-games-by-tutorials-v1-3/14193/7 "2017-05-11T15:50:45Z")

</div>

Page 525: There is an additional || os(tvOS) needed in update(\_ ) in the update camera section.

Replace  
#elseif os(OSX)

with  
#elseif os(OSX) || os(tvOS)

---

<div class="post-metadata">

**Author:** ![abunur](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/abunur/32/109585_2.png) [@abunur](https://forums.kodeco.com/u/abunur)\
**Post date:** [October 21, 2017, 11:26pm UTC](https://forums.kodeco.com/t/errata-for-2d-ios-tvos-games-by-tutorials-v1-3/14193/8 "2017-10-21T23:26:08Z")

</div>

typo Page 40 (ePub)

> iamge

instead of “image”

---

<div class="post-metadata">

**Author:** ![gdubz](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gdubz/32/88680_2.png) [@gdubz](https://forums.kodeco.com/u/gdubz)\
**Post date:** [June 20, 2018, 12:28pm UTC](https://forums.kodeco.com/t/errata-for-2d-ios-tvos-games-by-tutorials-v1-3/14193/10 "2018-06-20T12:28:33Z")

</div>

Bug introduced by recommended code on Page 409 (PDF).

> Then, in GameScene, replace didMove(to:) with this code:

```swift
override func didMove(to view: SKView) {
  if gameState == .initial {
    addChild(player)
    setupWorldPhysics()
    createBugs()
    setupObstaclePhysics()
    if firebugCount > 0 {
      createBugspray(quantity: firebugCount + 10)
    }
    setupHUD()
    gameState = .start
  }
  setupCamera()
}

```

There’s a line within the `setupWorldPhysics()` method that sets the GameScene class as the `SKPhysicsContactDelegate`. Since this was moved into a code block that only runs when the `gameState == .initial` then, when loading a saved game, the physics contact checking done in `didBegin(contact:)` is no longer firing, therefore you can’t eradicate Bugs in loaded saved games.

I resolved this by moving the following line out of the `setupWorldPhysics()` and put it right before `setupCamera()` in GameScene’s `didMove(to:)` so that it’s always run:

```swift
physicsWorld.contactDelegate = self

```
