# RxSwift v1.0 Errata

**URL:** <https://forums.kodeco.com/t/rxswift-v1-0-errata/27818>\
**Category:** RxSwift\
**Created:** [April 3, 2017, 3:10pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818 "2017-04-03T15:10:41Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![icanzilb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/icanzilb/32/109333_2.png) [@icanzilb](https://forums.kodeco.com/u/icanzilb)\
**Post date:** [April 10, 2017, 5:27am UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/22 "2017-04-10T05:27:08Z")

</div>

yeah, we noticed onNext/onCompleted got mixed up in the challenge code - it’s gonna be fixed in next edition 🙂 thanks!

---

<div class="post-metadata">

**Author:** ![seantanly](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/seantanly/32/62912_2.png) [@seantanly](https://forums.kodeco.com/u/seantanly)\
**Post date:** [April 10, 2017, 10:17am UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/23 "2017-04-10T10:17:29Z")

</div>

🙂  
Another point about Chapter 6 Pg 123 on using `takeWhile` together with `self?.images.value.count ?? 0 ) < 6`

We can also make use of `takeWhileWithIndex` that’s covered in the previous Chapter 5 as the last filter to limit the photo count, to avoid the direct property access that’s mentioned on page. 😄

`.takeWhileWithIndex { image, index in index < 6 }`

---

<div class="post-metadata">

**Author:** ![icanzilb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/icanzilb/32/109333_2.png) [@icanzilb](https://forums.kodeco.com/u/icanzilb)\
**Post date:** [April 10, 2017, 10:31am UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/24 "2017-04-10T10:31:48Z")

</div>

Keep them coming! That’s a great proposal

---

<div class="post-metadata">

**Author:** ![kajino](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kajino/32/81494_2.png) [@kajino](https://forums.kodeco.com/u/kajino)\
**Post date:** [April 10, 2017, 4:15pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/26 "2017-04-10T16:15:08Z")

</div>

Challenge  
04-observables-in-practice

```
func showMessage(_ title: String, description: String? = nil) {
alert(title: title, text: description)
  .subscribe(onNext: { [weak self] in
    self?.dismiss(animated: true, completion: nil)
  })
  .addDisposableTo(bag)

```

}

the onNext: Never be called why you need to put It there?

---

<div class="post-metadata">

**Author:** ![icanzilb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/icanzilb/32/109333_2.png) [@icanzilb](https://forums.kodeco.com/u/icanzilb)\
**Post date:** [April 10, 2017, 4:39pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/27 "2017-04-10T16:39:41Z")

</div>

this has been addressed, will fix in the next edition 🙂

---

<div class="post-metadata">

**Author:** ![wyatt](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/wyatt/32/102075_2.png) [@wyatt](https://forums.kodeco.com/u/wyatt)\
**Post date:** [April 10, 2017, 8:47pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/28 "2017-04-10T20:47:47Z")

</div>

Chapter 2 page 59.

factories that vend =\> send

---

<div class="post-metadata">

**Author:** ![danvw](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/danvw/32/105554_2.png) [@danvw](https://forums.kodeco.com/u/danvw)\
**Post date:** [April 10, 2017, 9:31pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/29 "2017-04-10T21:31:05Z")

</div>

Page 137 of print: `grant-acecss-alert-box` → `grant-access-alert-box`

---

<div class="post-metadata">

**Author:** ![danvw](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/danvw/32/105554_2.png) [@danvw](https://forums.kodeco.com/u/danvw)\
**Post date:** [April 11, 2017, 12:53am UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/30 "2017-04-11T00:53:15Z")

</div>

Chapter 7, Getting Started paragraph, there is reference to `unicodeDescription(lowercased:)`. This isn’t found or used in any of the source, and, it’s also not discussed in Chapter 5. I presume this has something to do with `example(of:)`?

---

<div class="post-metadata">

**Author:** ![seantanly](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/seantanly/32/62912_2.png) [@seantanly](https://forums.kodeco.com/u/seantanly)\
**Post date:** [April 12, 2017, 10:19am UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/31 "2017-04-12T10:19:14Z")

</div>

For Chapter 8 Challenge 2, may I suggest instead of convoluting the original

`func fetchEvents(repo: String)`

into doing more than it should (ignoring its input argument for that matter), we can suggest the reader to create a new function

`func fetchTop5Repo() -> Observable<[String]>`

that grabs the 5 repo `full_name` as required and feed it into `func fetchEvents(repo: String)`. The coordination can be done in `func refresh()` and this should work for the challenge. :]

---

<div class="post-metadata">

**Author:** ![jnew](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jnew/32/63337_2.png) [@jnew](https://forums.kodeco.com/u/jnew)\
**Post date:** [April 13, 2017, 3:31pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/32 "2017-04-13T15:31:29Z")

</div>

I was just reading through chapter 4 and on page 78 the book says to add two variables and then mark them as ‘private’ because no other class will be using them. I just wanted to point out that that is not the case.

The ‘private’ marker in Swift 3.0 marks an item as private to the module, which in this case means any other class in the module (project) can access them! To make them truly private for just that class they need to be marked as ‘fileprivate’ 🙂

---

<div class="post-metadata">

**Author:** ![icanzilb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/icanzilb/32/109333_2.png) [@icanzilb](https://forums.kodeco.com/u/icanzilb)\
**Post date:** [April 13, 2017, 4:00pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/33 "2017-04-13T16:00:43Z")

</div>

The apple docs disagree: [Access Control — The Swift Programming Language (Swift 5.7)](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/AccessControl.html)

---

<div class="post-metadata">

**Author:** ![jnew](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jnew/32/63337_2.png) [@jnew](https://forums.kodeco.com/u/jnew)\
**Post date:** [April 13, 2017, 5:25pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/34 "2017-04-13T17:25:20Z")

</div>

My apologies! Looks like I misunderstood the change from private → fileprivate and what private means now. Thanks for the link to the docs though!

---

<div class="post-metadata">

**Author:** ![icanzilb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/icanzilb/32/109333_2.png) [@icanzilb](https://forums.kodeco.com/u/icanzilb)\
**Post date:** [April 16, 2017, 6:14am UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/36 "2017-04-16T06:14:45Z")

</div>

If you’d like to know how the completed method looks at any point you can always have a look at the completed project. We can’t include the full source code for each file at every step as you can imagine.

I’m looking at the text and not sure what do you find confusing in that part? The text says “Scroll to the top of actionAdd() and alter the first subscription to newPhotos. For the first operator, insert a filter:”

I think a “before” got edited to “for” by mistake and we can fix that, but if you don’t get the expected behavior I can recommend either tracing back your steps through the tutorial or comparing with the completed project included in the chapter.

---

<div class="post-metadata">

**Author:** ![icanzilb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/icanzilb/32/109333_2.png) [@icanzilb](https://forums.kodeco.com/u/icanzilb)\
**Post date:** [April 16, 2017, 6:31am UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/37 "2017-04-16T06:31:01Z")

</div>

You also might wanna watch your tone, profanities aren’t generally accepted on these forums no matter if you delete your posts afterwards.

---

<div class="post-metadata">

**Author:** ![dcdude](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/dcdude/32/105896_2.png) [@dcdude](https://forums.kodeco.com/u/dcdude)\
**Post date:** [April 16, 2017, 12:29pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/38 "2017-04-16T12:29:54Z")

</div>

I deleted the question. I don’t believe I used profanity, though my frustration might have come through 🙂 My apologies if my frustration reflected in my tone. I have no idea what the issue was that I encountered, but I put down the chapter, came back and started fresh this morning and it worked fine.

---

<div class="post-metadata">

**Author:** ![rmorbach](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rmorbach/32/110937_2.png) [@rmorbach](https://forums.kodeco.com/u/rmorbach)\
**Post date:** [April 16, 2017, 5:06pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/39 "2017-04-16T17:06:46Z")

</div>

Page 95. Typo “Work though all the…” → “Work through all the…”

---

<div class="post-metadata">

**Author:** ![seantanly](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/seantanly/32/62912_2.png) [@seantanly](https://forums.kodeco.com/u/seantanly)\
**Post date:** [April 18, 2017, 3:50am UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/40 "2017-04-18T03:50:44Z")

</div>

\*\* Chapter 14 Challenge - Reachability detection problem for iOS 10 simulator:

Reachability detection currently does not work on iOS 10 simulator (tested on iOS 10.3).  
Related: [Reachability doesn't detect reconnection in iOS 10 Simulator · Issue #151 · ashleymills/Reachability.swift · GitHub](https://github.com/ashleymills/Reachability.swift/issues/151)

I tested and reachability detection works on an actual iOS device. Please advise the reader to run the challenge on an iOS device or try running it on iOS 9.3 simulator.

---

<div class="post-metadata">

**Author:** ![seantanly](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/seantanly/32/62912_2.png) [@seantanly](https://forums.kodeco.com/u/seantanly)\
**Post date:** [April 18, 2017, 5:12pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/41 "2017-04-18T17:12:40Z")

</div>

Chapter 16, Page 311 - RxBlocking version always succeeds if RxError.timeout is thrown

The test function `testColorIsRedWhenHexStringIsFF0000()` will always succeed because `XCTAssertEqual(result, .red)` is skipped whenever the guard clause is triggered, or RxError.timeout is thrown.

Making some changes to the original version,

```auto
    func testColorIsRedWhenHexStringIsFF0000() {
        let colorObservable = viewModel.color.asObservable().subscribeOn(scheduler)

        viewModel.hexString.value = "#ff0000"

        var result: UIColor?
        do {
            result = try colorObservable.toBlocking(timeout: 1.0).first()
        } catch {
            print(error)
        }
        XCTAssertEqual(result, .red)
    }

```

---

<div class="post-metadata">

**Author:** ![normand1](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/normand1/32/88365_2.png) [@normand1](https://forums.kodeco.com/u/normand1)\
**Post date:** [April 22, 2017, 8:46pm UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/42 "2017-04-22T20:46:25Z")

</div>

pg. 176 “Nothing happens happen until” → “Nothing happens until”

---

<div class="post-metadata">

**Author:** ![normand1](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/normand1/32/88365_2.png) [@normand1](https://forums.kodeco.com/u/normand1)\
**Post date:** [April 24, 2017, 12:53am UTC](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818/43 "2017-04-24T00:53:13Z")

</div>

On pg 205:  
“Replace the whole piece of code inside viewDidLoad() that sets updatedCategories with:”

Should be:  
“Replace the whole piece of code inside startDownload() that sets updatedCategories with:”

I checked the final project and could not find the suggested code in viewDidLoad() so I think the above is a mistake, otherwise I might just be confused 😄

[Previous page](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818.md?page=1)

[Next page](https://forums.kodeco.com/t/rxswift-v1-0-errata/27818.md?page=3)
