# 📚 Official Books

**URL:** https://forums.kodeco.com/c/books/6.md?page=53

[Latest](https://forums.kodeco.com/latest.md) · [Categories](https://forums.kodeco.com/categories.md) · [Tags](https://forums.kodeco.com/tags.md)

**Page:** 54

---

## [Chapter 16 Bug in the Fireworks section](https://forums.kodeco.com/t/chapter-16-bug-in-the-fireworks-section/136406)

<div class="topic-metadata">

**Author:** [@miraco](https://forums.kodeco.com/u/miraco)\
**Replies:** 3\
**Last updated:** [April 1, 2021, 1:04am UTC](https://forums.kodeco.com/t/chapter-16-bug-in-the-fireworks-section/136406 "2021-04-01T01:04:38Z")

</div>

Hello Caroline: I’m writing to report a small bug in Chapter 16, section Fireworks. The code in draw(in:): guard let particleEncoder = commandBuffer.makeComputeCommandEncoder() else { return } particleEncoder.setComp…

---

## [Chapter 1: Challenges - Question 8](https://forums.kodeco.com/t/chapter-1-challenges-question-8/130236)

<div class="topic-metadata">

**Author:** [@rolovee](https://forums.kodeco.com/u/rolovee)\
**Replies:** 1\
**Last updated:** [March 31, 2021, 11:54pm UTC](https://forums.kodeco.com/t/chapter-1-challenges-question-8/130236 "2021-03-31T23:54:59Z")

</div>

Can someone explain how you can use modulo to truncate a number to a range that you want? Maybe I’m not understanding what exactly the text means by this. For example, say we have the integer 2\_453\_922. Does that mean t…

---

## [Chapter 12: Unexpectedly found nil while implicitly unwrapping](https://forums.kodeco.com/t/chapter-12-unexpectedly-found-nil-while-implicitly-unwrapping/136583)

<div class="topic-metadata">

**Author:** [@steveb\_la](https://forums.kodeco.com/u/steveb_la)\
**Replies:** 5\
**Last updated:** [March 31, 2021, 9:14pm UTC](https://forums.kodeco.com/t/chapter-12-unexpectedly-found-nil-while-implicitly-unwrapping/136583 "2021-03-31T21:14:16Z")

</div>

After adding this line to AddItemViewController: textField.becomeFirstResponder() I get this: Unexpectedly found nil while implicitly unwrapping Help!

---

## [Problem with Chap 10](https://forums.kodeco.com/t/problem-with-chap-10/136146)

<div class="topic-metadata">

**Author:** [@marvmax](https://forums.kodeco.com/u/marvmax)\
**Replies:** 5\
**Last updated:** [March 31, 2021, 8:38am UTC](https://forums.kodeco.com/t/problem-with-chap-10/136146 "2021-03-31T08:38:13Z")

</div>

When I started using the starter for Chap 10 it get 18 error messages like ‘Scene’ is only available in macOS 11.0 or newer’. I get 18 messages like this. I opened Chap 11 and get the same messages. I think it is obvi…

---

## [Question regarding chapter 8.4](https://forums.kodeco.com/t/question-regarding-chapter-8-4/136398)

<div class="topic-metadata">

**Author:** [@ionutac](https://forums.kodeco.com/u/ionutac)\
**Replies:** 4\
**Last updated:** [March 30, 2021, 9:53am UTC](https://forums.kodeco.com/t/question-regarding-chapter-8-4/136398 "2021-03-30T09:53:24Z")

</div>

Is there a reason for using @Binding var numberOfAnswered: Int instead of let numberOfAnswered: Int? Due to the fact that ScoreView should not change the value of the source of truth, it shouldn’t contain the Binding pr…

---

## [Subscription and Subscriber](https://forums.kodeco.com/t/subscription-and-subscriber/136173)

<div class="topic-metadata">

**Author:** [@richmond\_jam](https://forums.kodeco.com/u/richmond_jam)\
**Replies:** 2\
**Last updated:** [March 30, 2021, 4:14am UTC](https://forums.kodeco.com/t/subscription-and-subscriber/136173 "2021-03-30T04:14:23Z")

</div>

Hello, I am a beginner of Combine Framework. And I have a question to wanna get answer. Would you please tell me what the essential different between subscription and subscriber. I just only know they confirm different p…

---

## [Debug Preview problem](https://forums.kodeco.com/t/debug-preview-problem/135651)

<div class="topic-metadata">

**Author:** [@chinggis](https://forums.kodeco.com/u/chinggis)\
**Replies:** 3\
**Last updated:** [March 27, 2021, 7:47pm UTC](https://forums.kodeco.com/t/debug-preview-problem/135651 "2021-03-27T19:47:27Z")

</div>

Using latest Xcode 12 & Big Sur releases. In Chapter 3.2 under Debugging, ctrl-click on Preview play button is not working (i.e., menu containing Debug Preview does not appear). Any thoughts?

---

## [Building a website with access to SMB file shares](https://forums.kodeco.com/t/building-a-website-with-access-to-smb-file-shares/135811)

<div class="topic-metadata">

**Author:** [@yungdai](https://forums.kodeco.com/u/yungdai)\
**Replies:** 1\
**Last updated:** [March 27, 2021, 4:54pm UTC](https://forums.kodeco.com/t/building-a-website-with-access-to-smb-file-shares/135811 "2021-03-27T16:54:21Z")

</div>

I want to use my Vapor skills to build a website to create XML files to drop into an SMB share in our corporate network. Would that be possible with Vapor? I’ve already built a macOS version of our internal company app…

---

## [Handling Calculations and Sorting in API vs in iOS Application](https://forums.kodeco.com/t/handling-calculations-and-sorting-in-api-vs-in-ios-application/134789)

<div class="topic-metadata">

**Author:** [@mtcameron5](https://forums.kodeco.com/u/mtcameron5)\
**Replies:** 1\
**Last updated:** [March 27, 2021, 4:53pm UTC](https://forums.kodeco.com/t/handling-calculations-and-sorting-in-api-vs-in-ios-application/134789 "2021-03-27T16:53:29Z")

</div>

This is a design question with the answer probably being determined by what is computationally more effecient. Sorry if this has been answered in the book directly or indirectly, but I have not seen an answer to my quest…

---

## [Regarding view modifiers in chap 3.1](https://forums.kodeco.com/t/regarding-view-modifiers-in-chap-3-1/136137)

<div class="topic-metadata">

**Author:** [@chinggis](https://forums.kodeco.com/u/chinggis)\
**Replies:** 2\
**Last updated:** [March 27, 2021, 4:27pm UTC](https://forums.kodeco.com/t/regarding-view-modifiers-in-chap-3-1/136137 "2021-03-27T16:27:50Z")

</div>

Perhaps I am misunderstanding something (quite possible). I know that one can define custom view modifiers, but was under the impression that one had to use the modifier keyword when defining one. In ViewExtension.swift,…

---

## [Why is the Node implemented as a class and not a struct?](https://forums.kodeco.com/t/why-is-the-node-implemented-as-a-class-and-not-a-struct/135214)

<div class="topic-metadata">

**Author:** [@wao218](https://forums.kodeco.com/u/wao218)\
**Replies:** 1\
**Last updated:** [March 27, 2021, 3:06pm UTC](https://forums.kodeco.com/t/why-is-the-node-implemented-as-a-class-and-not-a-struct/135214 "2021-03-27T15:06:44Z")

</div>

I was wondering if anyone could explain why the Node object is implemented as a class instead of a struct. Wouldn’t implementing the Node class as a struct allow it to conform to value semantics? Wouldn’t a struct elimin…

---

## [Challenge Code Corrupt](https://forums.kodeco.com/t/challenge-code-corrupt/135659)

<div class="topic-metadata">

**Author:** [@createch](https://forums.kodeco.com/u/createch)\
**Replies:** 1\
**Last updated:** [March 27, 2021, 12:01am UTC](https://forums.kodeco.com/t/challenge-code-corrupt/135659 "2021-03-27T00:01:25Z")

</div>

The challenge code provided for the Mac App Challenge in Chapter 20 is corrupt and will not compile. There appears to be a lot of code from the BullsEye project embedded in at least one of the files.

---

## [Section III, and Apple Documentation \> Core ML & Create ML](https://forums.kodeco.com/t/section-iii-and-apple-documentation-core-ml-create-ml/108944)

<div class="topic-metadata">

**Author:** [@catzshadowy](https://forums.kodeco.com/u/catzshadowy)\
**Replies:** 4\
**Last updated:** [March 26, 2021, 7:24am UTC](https://forums.kodeco.com/t/section-iii-and-apple-documentation-core-ml-create-ml/108944 "2021-03-26T07:24:42Z")

</div>

I have been reading over the Apple Developer - Documentation \> Core ML & Create ML Both seem to have a connection to NLP - Natural Language Processing. But - Section III - doesn’t seem to follow what is being said in …

---

## [Chapter 4 Previewing UIKit Views](https://forums.kodeco.com/t/chapter-4-previewing-uikit-views/129626)

<div class="topic-metadata">

**Author:** [@omran\_k](https://forums.kodeco.com/u/omran_k)\
**Replies:** 1\
**Last updated:** [March 26, 2021, 2:31am UTC](https://forums.kodeco.com/t/chapter-4-previewing-uikit-views/129626 "2021-03-26T02:31:18Z")

</div>

In Chapter 4 in the section for Previewing UIKit views, I am getting the following error after following the code exactly:

---

## [Chapter 2 page 62 error with HealthySnacks()](https://forums.kodeco.com/t/chapter-2-page-62-error-with-healthysnacks/97538)

<div class="topic-metadata">

**Author:** [@fongrel](https://forums.kodeco.com/u/fongrel)\
**Replies:** 8\
**Last updated:** [March 25, 2021, 11:18pm UTC](https://forums.kodeco.com/t/chapter-2-page-62-error-with-healthysnacks/97538 "2021-03-25T23:18:43Z")

</div>

Using macOS Catalina 10.15.1, Xcode 11.2.1 for the line let healthySnacks = HealthySnacks() I am getting the error: Cannot call value of non-function type ‘module’ Not very sure what is the issue… think the HealthyS…

---

## [Chapter 5: Symbolic breakpoint doesn't trigger](https://forums.kodeco.com/t/chapter-5-symbolic-breakpoint-doesnt-trigger/97227)

<div class="topic-metadata">

**Author:** [@sparklydust](https://forums.kodeco.com/u/sparklydust)\
**Replies:** 7\
**Last updated:** [March 25, 2021, 11:03pm UTC](https://forums.kodeco.com/t/chapter-5-symbolic-breakpoint-doesnt-trigger/97227 "2021-03-25T23:03:53Z")

</div>

Hello, When creating a symbolic breakpoint Signals.MasterContainerViewController.viewDidLoad() → () Then Build and Run the app, Xcode doesn’t trigger it. How come or what have I done wrong? It seems that I have done …

---

## [Stevelhunt@me.com](https://forums.kodeco.com/t/stevelhunt-me-com/135921)

<div class="topic-metadata">

**Author:** [@stevelhunt](https://forums.kodeco.com/u/stevelhunt)\
**Replies:** 1\
**Last updated:** [March 24, 2021, 11:07pm UTC](https://forums.kodeco.com/t/stevelhunt-me-com/135921 "2021-03-24T23:07:57Z")

</div>

I’ve just started UIKit Apprentice and I need to know how to undo an incorrect IBOutlet connection. I’ve tried to use the “delete” key. but it does not erase the connection. Can anyone help?

---

## [How to use YUV In Metal](https://forums.kodeco.com/t/how-to-use-yuv-in-metal/135876)

<div class="topic-metadata">

**Author:** [@richmond\_jam](https://forums.kodeco.com/u/richmond_jam)\
**Replies:** 1\
**Last updated:** [March 24, 2021, 9:08am UTC](https://forums.kodeco.com/t/how-to-use-yuv-in-metal/135876 "2021-03-24T09:08:05Z")

</div>

Hello Caroline, if I want to operate YUV in metal, would you please tell me how can I do?

---

## [Question regarding chapter 4.2](https://forums.kodeco.com/t/question-regarding-chapter-4-2/135702)

<div class="topic-metadata">

**Author:** [@chinggis](https://forums.kodeco.com/u/chinggis)\
**Replies:** 3\
**Last updated:** [March 23, 2021, 2:01pm UTC](https://forums.kodeco.com/t/question-regarding-chapter-4-2/135702 "2021-03-23T14:01:37Z")

</div>

I am concentrating on Swift and SwiftUI and am not familiar with UIKit related mechanisms. I went to the library and dragged the Hosting View Controller object onto the storyboard, but no visible object appeared there. W…

---

## [Chapter 2 in Key points error](https://forums.kodeco.com/t/chapter-2-in-key-points-error/135830)

<div class="topic-metadata">

**Author:** [@jmbradnan](https://forums.kodeco.com/u/jmbradnan)\
**Replies:** 0\
**Last updated:** [March 23, 2021, 12:11am UTC](https://forums.kodeco.com/t/chapter-2-in-key-points-error/135830 "2021-03-23T00:11:42Z")

</div>

At the top of Key points section at the end of chapter two is says: “Well done, you’ve reached the end of the first chapter.”

---

## [Error - Chapter 17 - ECS and Collaborative](https://forums.kodeco.com/t/error-chapter-17-ecs-and-collaborative/135764)

<div class="topic-metadata">

**Author:** [@24395.carlos](https://forums.kodeco.com/u/24395.carlos)\
**Replies:** 1\
**Last updated:** [March 22, 2021, 3:44pm UTC](https://forums.kodeco.com/t/error-chapter-17-ecs-and-collaborative/135764 "2021-03-22T15:44:27Z")

</div>

In Adding multi-peer connectivity I found an error. He asked to build the app soon after, but can’t build it because of Bool’s return. Further on he puts the code, but after this point.

---

## [Chapter 6 Dependency Injection not working](https://forums.kodeco.com/t/chapter-6-dependency-injection-not-working/132592)

<div class="topic-metadata">

**Author:** [@marvmax](https://forums.kodeco.com/u/marvmax)\
**Replies:** 3\
**Last updated:** [March 21, 2021, 4:07pm UTC](https://forums.kodeco.com/t/chapter-6-dependency-injection-not-working/132592 "2021-03-21T16:07:45Z")

</div>

I’m getting an error on the init injection dependency. Here’s the code in having problem with init(keyboardHandler: KeyboardFollower) { self.keyboardhandler = keyboardhandler } And the error is ‘self’ used before a…

---

## [In page 375 that image picture, two red text , in your picture first one 's width is smaller than the second one](https://forums.kodeco.com/t/in-page-375-that-image-picture-two-red-text-in-your-picture-first-one-s-width-is-smaller-than-the-second-one/119832)

<div class="topic-metadata">

**Author:** [@yangwulong1978](https://forums.kodeco.com/u/yangwulong1978)\
**Replies:** 1\
**Last updated:** [March 21, 2021, 4:03pm UTC](https://forums.kodeco.com/t/in-page-375-that-image-picture-two-red-text-in-your-picture-first-one-s-width-is-smaller-than-the-second-one/119832 "2021-03-21T16:03:21Z")

</div>

in page 375 that image picture, two red text , in your picture first one 's width is smaller than the second one. and have explanation why behaviour like that. but I test the same code , it is different , left text h…

---

## [Chapter 4 - Dice textures not correct on first run](https://forums.kodeco.com/t/chapter-4-dice-textures-not-correct-on-first-run/114001)

<div class="topic-metadata">

**Author:** [@chuck\_taylor](https://forums.kodeco.com/u/chuck_taylor)\
**Replies:** 1\
**Last updated:** [March 20, 2021, 10:22pm UTC](https://forums.kodeco.com/t/chapter-4-dice-textures-not-correct-on-first-run/114001 "2021-03-20T22:22:21Z")

</div>

Whenever I first install the AR Poker dice app for the first time, the textures are not correct. If I then run the app a second time, the textures are working properly. Any thoughts? You can see a video of the issue here…

---

## [Errata for Combine: Asynchronous Programming with Swift 1st Edition](https://forums.kodeco.com/t/errata-for-combine-asynchronous-programming-with-swift-1st-edition/79656)

<div class="topic-metadata">

**Author:** [@mandafrederick](https://forums.kodeco.com/u/mandafrederick)\
**Replies:** 66\
**Last updated:** [March 20, 2021, 9:34pm UTC](https://forums.kodeco.com/t/errata-for-combine-asynchronous-programming-with-swift-1st-edition/79656 "2021-03-20T21:34:49Z")

</div>

Creating this topic to catch any typos and bugs in the 1st Edition of Combine: Asynchronous Programming with Swift.

---

## [Chapter 5 Starter Project Stride number when setting normals](https://forums.kodeco.com/t/chapter-5-starter-project-stride-number-when-setting-normals/60781)

<div class="topic-metadata">

**Author:** [@henrygorner](https://forums.kodeco.com/u/henrygorner)\
**Replies:** 7\
**Last updated:** [March 20, 2021, 9:28pm UTC](https://forums.kodeco.com/t/chapter-5-starter-project-stride-number-when-setting-normals/60781 "2021-03-20T21:28:48Z")

</div>

Hi, Just looking at Chapter 5 starter project and I am at the point where I am adding a vertex descriptor attribute for normals on page 120. The code is as follows: vertexDescriptor.attributes\[1\] = MDLVerte…

---

## [Errata for SwiftUI by Tutorials, 2nd ed](https://forums.kodeco.com/t/errata-for-swiftui-by-tutorials-2nd-ed/113195)

<div class="topic-metadata">

**Author:** [@mandafrederick](https://forums.kodeco.com/u/mandafrederick)\
**Replies:** 28\
**Last updated:** [March 20, 2021, 8:32pm UTC](https://forums.kodeco.com/t/errata-for-swiftui-by-tutorials-2nd-ed/113195 "2021-03-20T20:32:55Z")

</div>

Creating this topic to catch any typos and bugs in the 2nd Edition of SwiftUI by Tutorials.

---

## [Chapter 5 - Challenge - toArray creates Single\<\[Int\]\> that can't be subscribed to](https://forums.kodeco.com/t/chapter-5-challenge-toarray-creates-single-int-that-cant-be-subscribed-to/113862)

<div class="topic-metadata">

**Author:** [@frankaceves](https://forums.kodeco.com/u/frankaceves)\
**Replies:** 1\
**Last updated:** [March 20, 2021, 8:14pm UTC](https://forums.kodeco.com/t/chapter-5-challenge-toarray-creates-single-int-that-cant-be-subscribed-to/113862 "2021-03-20T20:14:49Z")

</div>

Picking back up from an old post. Not sure if this is going to be addressed in the book update this year, but the .toArray method creates a Single that can’t be observed. func toArray() -\> Single\<\[Int\]\> Summary Conve…

---

## [Chapter 9 - Forward Vector for 3D](https://forums.kodeco.com/t/chapter-9-forward-vector-for-3d/134763)

<div class="topic-metadata">

**Author:** [@thaliloglu](https://forums.kodeco.com/u/thaliloglu)\
**Replies:** 5\
**Last updated:** [March 20, 2021, 7:56pm UTC](https://forums.kodeco.com/t/chapter-9-forward-vector-for-3d/134763 "2021-03-20T19:56:31Z")

</div>

Hi Caroline, I’m trying to implement space rocket movement like pitch, yaw, roll and accelerate with key bindings. I’ve modified the forward vector for 3D space like; normalize(\[sin(rotation.y), -tan(rotation.x), cos(…

---

## [Possible to buy ebook?](https://forums.kodeco.com/t/possible-to-buy-ebook/134825)

<div class="topic-metadata">

**Author:** [@jasmith](https://forums.kodeco.com/u/jasmith)\
**Replies:** 0\
**Last updated:** [March 11, 2021, 10:12am UTC](https://forums.kodeco.com/t/possible-to-buy-ebook/134825 "2021-03-11T10:12:34Z")

</div>

If I have a membership is it also possible to buy / download an ePub or pdf version? I very much prefer to read in Books vs the web (with highlighting, bookmarks etc). Thanks!

[Previous page](https://forums.kodeco.com/c/books/6.md?page=52)

[Next page](https://forums.kodeco.com/c/books/6.md?page=54)
