# 📚 Official Books

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

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

**Page:** 5

---

## [Storing Window Settings Experiment don't work for me](https://forums.kodeco.com/t/storing-window-settings-experiment-dont-work-for-me/169620)

<div class="topic-metadata">

**Author:** [@carlosypunto74](https://forums.kodeco.com/u/carlosypunto74)\
**Replies:** 22\
**Last updated:** [November 9, 2024, 12:07am UTC](https://forums.kodeco.com/t/storing-window-settings-experiment-dont-work-for-me/169620 "2024-11-09T00:07:27Z")

</div>

Hi, Trying the experiment of page 106 on section Storing Window Settings, when I reopen the app, it only open one window. I have tried to do what the note says and no more windows appear either. I’m not sure why this h…

---

## [Another Debug Fragment Shader question](https://forums.kodeco.com/t/another-debug-fragment-shader-question/207085)

<div class="topic-metadata">

**Author:** [@petenish](https://forums.kodeco.com/u/petenish)\
**Replies:** 2\
**Last updated:** [November 1, 2024, 2:17pm UTC](https://forums.kodeco.com/t/another-debug-fragment-shader-question/207085 "2024-11-01T14:17:08Z")

</div>

I had introduced a bug into my fragment shader (Ch 21 - I eventually found my error - cut and paste), but I thought maybe I could use “capture the GPU workload” and debug the fragment shader. Alas, I couldn’t figure out…

---

## [Chapter 02 - Births and Dates swapped in display](https://forums.kodeco.com/t/chapter-02-births-and-dates-swapped-in-display/207086)

<div class="topic-metadata">

**Author:** [@oleamichael](https://forums.kodeco.com/u/oleamichael)\
**Replies:** 2\
**Last updated:** [November 1, 2024, 4:59am UTC](https://forums.kodeco.com/t/chapter-02-births-and-dates-swapped-in-display/207086 "2024-11-01T04:59:25Z")

</div>

Hi. This happens both in my code and in the provided Final and Challenge versions of On This Day - when I click on Births in the sidebar I get deaths in the detail view, and when I click on Deaths in the sidebar I get bi…

---

## [Ch19 : Web page typo?](https://forums.kodeco.com/t/ch19-web-page-typo/206998)

<div class="topic-metadata">

**Author:** [@petenish](https://forums.kodeco.com/u/petenish)\
**Replies:** 2\
**Last updated:** [October 25, 2024, 11:27pm UTC](https://forums.kodeco.com/t/ch19-web-page-typo/206998 "2024-10-25T23:27:31Z")

</div>

I “think” (this is Mr. FatFinger) there might be a typo in the web version of the Ch 19/Displacement. Attached is the image I just cut from my browser. Note that in the first code window you set the out.color to the …

---

## [Chapter 6: Testing Notifications With the Simulator](https://forums.kodeco.com/t/chapter-6-testing-notifications-with-the-simulator/193503)

<div class="topic-metadata">

**Author:** [@gugapc](https://forums.kodeco.com/u/gugapc)\
**Replies:** 1\
**Last updated:** [October 25, 2024, 12:25pm UTC](https://forums.kodeco.com/t/chapter-6-testing-notifications-with-the-simulator/193503 "2024-10-25T12:25:26Z")

</div>

I’ve created a new scheme and followed all the steps, but I never received the notification. Is there anything left? It’s running on a real device. I’ve tried it on both the simulator and a real device, with a focus on t…

---

## [Closure examples don't compile](https://forums.kodeco.com/t/closure-examples-dont-compile/206910)

<div class="topic-metadata">

**Author:** [@joshuk](https://forums.kodeco.com/u/joshuk)\
**Replies:** 1\
**Last updated:** [October 20, 2024, 3:01am UTC](https://forums.kodeco.com/t/closure-examples-dont-compile/206910 "2024-10-20T03:01:06Z")

</div>

None of these examples compile. var multiplyClosure = { (a, b) in a \* b } and var multiplyClosure = { $0 \* $1 } Ambiguous use of operator ‘\*’ - is the error

---

## [Suggestion for Flutter Apprentice](https://forums.kodeco.com/t/suggestion-for-flutter-apprentice/206905)

<div class="topic-metadata">

**Author:** [@uli\_sinn](https://forums.kodeco.com/u/uli_sinn)\
**Replies:** 0\
**Last updated:** [October 18, 2024, 7:37pm UTC](https://forums.kodeco.com/t/suggestion-for-flutter-apprentice/206905 "2024-10-18T19:37:47Z")

</div>

Hi, I thought it would be terrific to add an index to the book with all the UI widgets used, with a brief description and referencing where it was used (at least the e-book as no index whatsoever it seems). As I am goi…

---

## [Getting errors while creating the first project on augmented reality](https://forums.kodeco.com/t/getting-errors-while-creating-the-first-project-on-augmented-reality/206678)

<div class="topic-metadata">

**Author:** [@raghu](https://forums.kodeco.com/u/raghu)\
**Replies:** 7\
**Last updated:** [October 14, 2024, 3:17am UTC](https://forums.kodeco.com/t/getting-errors-while-creating-the-first-project-on-augmented-reality/206678 "2024-10-14T03:17:30Z")

</div>

Dear Team Good morning Ok I will do that as well,besides providing details to you here. I am using AR Tutorials Apple\_AR\_by\_Tutorials\_v2.0.0-2 I am working on macOS : OS venture 13.2, XCODE : 15.2 I started working …

---

## [Debug fragment Shader code (other than code inspection?)](https://forums.kodeco.com/t/debug-fragment-shader-code-other-than-code-inspection/206741)

<div class="topic-metadata">

**Author:** [@petenish](https://forums.kodeco.com/u/petenish)\
**Replies:** 6\
**Last updated:** [October 9, 2024, 6:07am UTC](https://forums.kodeco.com/t/debug-fragment-shader-code-other-than-code-inspection/206741 "2024-10-09T06:07:37Z")

</div>

At the end of Ch 14 (Deferred Rendering) I had a small problem. My final image (image-1) was not right. I took a GPU workload check (image-2) and the “Present” image looked right, but what came out wasn’t right. Firs…

---

## [Ch 14 : Starter Project Issue?](https://forums.kodeco.com/t/ch-14-starter-project-issue/206721)

<div class="topic-metadata">

**Author:** [@petenish](https://forums.kodeco.com/u/petenish)\
**Replies:** 6\
**Last updated:** [October 9, 2024, 6:04am UTC](https://forums.kodeco.com/t/ch-14-starter-project-issue/206721 "2024-10-09T06:04:40Z")

</div>

Hi, I loaded the Ch14 starter project (had downloaded met-materials-editions-4.0 on 2024.08.11) into Xcode (Version 16.0 (16A242d)) and I got a different view from that in the tutorial (see Image-1). I hit the “Forwar…

---

## [Errata for Expert Swift 1st Edition](https://forums.kodeco.com/t/errata-for-expert-swift-1st-edition/140282)

<div class="topic-metadata">

**Author:** [@jellodiil](https://forums.kodeco.com/u/jellodiil)\
**Replies:** 24\
**Last updated:** [March 8, 2023, 4:12pm UTC](https://forums.kodeco.com/t/errata-for-expert-swift-1st-edition/140282 "2023-03-08T16:12:50Z")

</div>

Creating this topic to catch any typos and bugs in the 1st Edition of Expert Swift.

---

## [Unexpected Crash (caused by shader)](https://forums.kodeco.com/t/unexpected-crash-caused-by-shader/206639)

<div class="topic-metadata">

**Author:** [@petenish](https://forums.kodeco.com/u/petenish)\
**Replies:** 1\
**Last updated:** [September 30, 2024, 12:29pm UTC](https://forums.kodeco.com/t/unexpected-crash-caused-by-shader/206639 "2024-09-30T12:29:54Z")

</div>

I’m in Chapter 12 (near the end) and all of a sudden, I started crashing, stopping at Model.Render.drawIndexedPrimitives. I tracked it down to some code in Fragment.metal. I put some extra code in to try and target …

---

## [Debug shader undefines](https://forums.kodeco.com/t/debug-shader-undefines/206634)

<div class="topic-metadata">

**Author:** [@petenish](https://forums.kodeco.com/u/petenish)\
**Replies:** 2\
**Last updated:** [September 29, 2024, 11:36am UTC](https://forums.kodeco.com/t/debug-shader-undefines/206634 "2024-09-29T11:36:19Z")

</div>

I have chronic Fat Finger Syndrome and am used to compilers yelling at me for misspelling routines (aka, get undefined symbols). I had this problem when I was setting up a fragment function (via library.makeFunction) a…

---

## ['Publishing changes from within view updates is not allowed, this will cause undefined behavior.' appearing in the console on a single-click of a list Item in the Sidebar](https://forums.kodeco.com/t/publishing-changes-from-within-view-updates-is-not-allowed-this-will-cause-undefined-behavior-appearing-in-the-console-on-a-single-click-of-a-list-item-in-the-sidebar/206564)

<div class="topic-metadata">

**Author:** [@tstyran](https://forums.kodeco.com/u/tstyran)\
**Replies:** 1\
**Last updated:** [September 24, 2024, 1:59am UTC](https://forums.kodeco.com/t/publishing-changes-from-within-view-updates-is-not-allowed-this-will-cause-undefined-behavior-appearing-in-the-console-on-a-single-click-of-a-list-item-in-the-sidebar/206564 "2024-09-24T01:59:10Z")

</div>

hello, after completing the macOS Apprentice and Snowman app, I noticed the error appearing in the console: ‘Publishing changes from within view updates is not allowed, this will cause undefined behavior.’ Running MacOS…

---

## [DogPatch api is offline](https://forums.kodeco.com/t/dogpatch-api-is-offline/206058)

<div class="topic-metadata">

**Author:** [@jesusrod](https://forums.kodeco.com/u/jesusrod)\
**Replies:** 2\
**Last updated:** [September 18, 2024, 8:11am UTC](https://forums.kodeco.com/t/dogpatch-api-is-offline/206058 "2024-09-18T08:11:17Z")

</div>

Followed chapter 8 and 9 up until the end when I finally realized that https://dogpatchserver.herokuapp.com/api/v1/dogs is offline. I think it’s not a great experience to do all that work and then it doesn’t work

---

## [Define the Data layer - Database](https://forums.kodeco.com/t/define-the-data-layer-database/205356)

<div class="topic-metadata">

**Author:** [@minhvuhero9](https://forums.kodeco.com/u/minhvuhero9)\
**Replies:** 5\
**Last updated:** [September 17, 2024, 2:56pm UTC](https://forums.kodeco.com/t/define-the-data-layer-database/205356 "2024-09-17T14:56:32Z")

</div>

Why only the Animal model not extends CoreDataPersistable? , and the another model like : Contact ,… model can be extends CoreDataPersistable and why that member of Contact init with var properties?

---

## [Chapter 4 (4th edition) MSL Math Constants](https://forums.kodeco.com/t/chapter-4-4th-edition-msl-math-constants/206314)

<div class="topic-metadata">

**Author:** [@oleamichael](https://forums.kodeco.com/u/oleamichael)\
**Replies:** 1\
**Last updated:** [September 7, 2024, 1:23am UTC](https://forums.kodeco.com/t/chapter-4-4th-edition-msl-math-constants/206314 "2024-09-07T01:23:54Z")

</div>

Hi. In the Challenge section of chapter 4, page 86 there is the comment: Notice that there’s no built in value for pi on the GPU. But MSL defines several mathematical constants, This works: position.x = radius \* cos(2…

---

## [Broken link in Chapter 25](https://forums.kodeco.com/t/broken-link-in-chapter-25/206416)

<div class="topic-metadata">

**Author:** [@elliotfiske](https://forums.kodeco.com/u/elliotfiske)\
**Replies:** 0\
**Last updated:** [September 12, 2024, 6:17pm UTC](https://forums.kodeco.com/t/broken-link-in-chapter-25/206416 "2024-09-12T18:17:41Z")

</div>

The link should be: https://lldb.llvm.org/python\_reference/lldb-module.html#eMatchTypeRegex It’s currently https://lldb.llvm.org/python\_reference/\_lldb%27-module.html#eMatchTypeRegex (has a stray underscore and ')

---

## [Chapter 4 (fourth edition) faulty vertexBuffer diagram](https://forums.kodeco.com/t/chapter-4-fourth-edition-faulty-vertexbuffer-diagram/206323)

<div class="topic-metadata">

**Author:** [@oleamichael](https://forums.kodeco.com/u/oleamichael)\
**Replies:** 1\
**Last updated:** [September 8, 2024, 11:16pm UTC](https://forums.kodeco.com/t/chapter-4-fourth-edition-faulty-vertexbuffer-diagram/206323 "2024-09-08T23:16:47Z")

</div>

Hi. On page 79 there is a diagram of a vertexBuffer that shows the stride between position attributes as 36 bytes, but the stride, as returned by the vertex descriptor, is actually 12 bytes.

---

## [How anchor works relative to another anchor?](https://forums.kodeco.com/t/how-anchor-works-relative-to-another-anchor/206014)

<div class="topic-metadata">

**Author:** [@darkcavalier11](https://forums.kodeco.com/u/darkcavalier11)\
**Replies:** 3\
**Last updated:** [September 5, 2024, 2:39pm UTC](https://forums.kodeco.com/t/how-anchor-works-relative-to-another-anchor/206014 "2024-09-05T14:39:07Z")

</div>

On chapter 6 Implementing self-sizing cells section there is a line of constraint that is follow contentView.trailingAnchor.constraint( greaterThanOrEqualTo: bubbleImageView.trailingAnchor, constant: 20), Fr…

---

## [MTKTextureLoader by URL fails](https://forums.kodeco.com/t/mtktextureloader-by-url-fails/206240)

<div class="topic-metadata">

**Author:** [@petenish](https://forums.kodeco.com/u/petenish)\
**Replies:** 4\
**Last updated:** [September 5, 2024, 11:27am UTC](https://forums.kodeco.com/t/mtktextureloader-by-url-fails/206240 "2024-09-05T11:27:51Z")

</div>

I’m new to Metal and I’m in Chapter 8 (Textures) and I wanted to load a simple .jpg as a texture. I added it as a texture asset and it worked, but I wanted to load it from outside the app. Below is a code-snippet, and…

---

## [Buffers, applying a property wrapper](https://forums.kodeco.com/t/buffers-applying-a-property-wrapper/206185)

<div class="topic-metadata">

**Author:** [@tchelyzt](https://forums.kodeco.com/u/tchelyzt)\
**Replies:** 2\
**Last updated:** [September 4, 2024, 10:22pm UTC](https://forums.kodeco.com/t/buffers-applying-a-property-wrapper/206185 "2024-09-04T22:22:00Z")

</div>

Hi, I have a SwiftUI app that sends some of its work to Metal to take advantage of parallelism (using a compute pipeline). A number of buffers are involved holding arrays of \[Int32\] and \[Float\]. It seemed like a good id…

---

## [Building for simulator in version 4.0](https://forums.kodeco.com/t/building-for-simulator-in-version-4-0/206093)

<div class="topic-metadata">

**Author:** [@oleamichael](https://forums.kodeco.com/u/oleamichael)\
**Replies:** 2\
**Last updated:** [August 26, 2024, 9:33pm UTC](https://forums.kodeco.com/t/building-for-simulator-in-version-4-0/206093 "2024-08-26T21:33:41Z")

</div>

Hi. The 4.0 version of this book has switched from using 2 targets - 1 for macOS and 1 for iOS to using a single muiltiplatform target - cool! But when I build and run I get a macOS app. How do I get it to build an iOS …

---

## [Ch. 07 page 171 Exit App not working](https://forums.kodeco.com/t/ch-07-page-171-exit-app-not-working/206078)

<div class="topic-metadata">

**Author:** [@oleamichael](https://forums.kodeco.com/u/oleamichael)\
**Replies:** 2\
**Last updated:** [August 26, 2024, 3:42pm UTC](https://forums.kodeco.com/t/ch-07-page-171-exit-app-not-working/206078 "2024-08-26T15:42:23Z")

</div>

Hi. On page 171 of chapter 7 in the discussion on Restoring Scene State With SceneStorage there is the following instruction: Exit the app in Simulator by swiping up from the bottom. That doesn’t seem to work. No amoun…

---

## [Doubts in setting up constraints for Y axis for a subview](https://forums.kodeco.com/t/doubts-in-setting-up-constraints-for-y-axis-for-a-subview/206000)

<div class="topic-metadata">

**Author:** [@darkcavalier11](https://forums.kodeco.com/u/darkcavalier11)\
**Replies:** 1\
**Last updated:** [August 25, 2024, 1:09pm UTC](https://forums.kodeco.com/t/doubts-in-setting-up-constraints-for-y-axis-for-a-subview/206000 "2024-08-25T13:09:34Z")

</div>

On the end of chapter 4, the challenge ask to code a view and center it on the screen. While i was able to build the view, not able to properly center it on the Y-axis. I saw the challenge solution, but it has the same i…

---

## [Chapter 4 Warning: Reference to captured var 'countdown' in concurrently-executing code; this is an error in Swift 6](https://forums.kodeco.com/t/chapter-4-warning-reference-to-captured-var-countdown-in-concurrently-executing-code-this-is-an-error-in-swift-6/176712)

<div class="topic-metadata">

**Author:** [@penacristian](https://forums.kodeco.com/u/penacristian)\
**Replies:** 5\
**Last updated:** [August 25, 2024, 11:27am UTC](https://forums.kodeco.com/t/chapter-4-warning-reference-to-captured-var-countdown-in-concurrently-executing-code-this-is-an-error-in-swift-6/176712 "2024-08-25T11:27:46Z")

</div>

Swift 6 will not allow referencing or mutating the ‘countdown’ variable inside the scheduleTimer block. What would be a Swift 6-compatible solution?

---

## [Chapter 19, large amount of textures?](https://forums.kodeco.com/t/chapter-19-large-amount-of-textures/205942)

<div class="topic-metadata">

**Author:** [@charleskerr64](https://forums.kodeco.com/u/charleskerr64)\
**Replies:** 2\
**Last updated:** [August 19, 2024, 1:00am UTC](https://forums.kodeco.com/t/chapter-19-large-amount-of-textures/205942 "2024-08-19T01:00:13Z")

</div>

I want to do something like Chapter 19, using a height map to generate maps. However, I have significantly more “terrain types”, so need to pass more then 3 texture types. Is there a way to pass an array of textures or …

---

## [Establishing the goals of Dependencies](https://forums.kodeco.com/t/establishing-the-goals-of-dependencies/205949)

<div class="topic-metadata">

**Author:** [@omarelsayed](https://forums.kodeco.com/u/omarelsayed)\
**Replies:** 0\
**Last updated:** [August 18, 2024, 4:29am UTC](https://forums.kodeco.com/t/establishing-the-goals-of-dependencies/205949 "2024-08-18T04:29:47Z")

</div>

In page 54, I didn’t understand how the dependency patterns help in Minimizing object lifetimes ? @rcach

---

## [Using .plane to create a single quad with varying corner point altitudes](https://forums.kodeco.com/t/using-plane-to-create-a-single-quad-with-varying-corner-point-altitudes/205886)

<div class="topic-metadata">

**Author:** [@charleskerr64](https://forums.kodeco.com/u/charleskerr64)\
**Replies:** 3\
**Last updated:** [August 15, 2024, 1:13am UTC](https://forums.kodeco.com/t/using-plane-to-create-a-single-quad-with-varying-corner-point-altitudes/205886 "2024-08-15T01:13:04Z")

</div>

Going back to chapter 9 as a reference, I want to paint a series of tiles (each with a different texture). The tiles are squares (44x44 each), but each vertex can have a different latitude (so y value). So I modified th…

---

## [Moving Window triggers MouseMovement](https://forums.kodeco.com/t/moving-window-triggers-mousemovement/205842)

<div class="topic-metadata">

**Author:** [@charleskerr64](https://forums.kodeco.com/u/charleskerr64)\
**Replies:** 5\
**Last updated:** [August 12, 2024, 5:51pm UTC](https://forums.kodeco.com/t/moving-window-triggers-mousemovement/205842 "2024-08-12T17:51:25Z")

</div>

I have Metal by Tutorials and chapter 9, navigating a 3d Scene the mouse is hooked up to rotate the scene. However, when one clicks on the window titlebar to move the window that also rotates the scene (the GameControlle…

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

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