Group Group Group Group Group Group Group Group Group

Errata for SwiftUI by Tutorials, 3rd Edition

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

The Challenge Source code for Chapter 20, Building a Mac App is completely messed up.
Lots of code injected from other projects has made the project completely unusable.

Crossposting: Starter project errors chapter 6

Crossposting: Starter project errors chapter 6

This is fixed. It was affecting chapters 6-10

Thanks for reporting, this is fixed now.

I ran final project in Chapter 6 and I’m getting this message in the console when toggle is activated:

Kuchi[41930:5518143] invalid mode ‘kCFRunLoopCommonModes’ provided to CFRunLoopRunSpecific - break on _CFRunLoopError_RunCalledWithInvalidMode to debug. This message will only appear once per execution.

Hi @tchelyzt,

Have you tried rebuilding project? Which version of Xcode and macOS are you using?

Antonio

Xcode: 12.4 (12D4e)
MacOS: 11.2.3
Yes, cleaned and rebooted. I expect it’s an Xcode or Simulator issue

Do you still have Xcode 12.2? I’d try that.

I’ve tested the code in 12.4, but that issue doesn’t happen to me. However I must say that I found 12.4 (and 12.3 as well) unstable - it freezes several times a day, and that happens on both of my Mac - that’s why for now I’m still using 12.2.

Thanks. I’ll let it go as it only produces a warning in the console. I’m up to Chapter 13 now and I’ve seen a great variety of console warnings on the way. Hopefully Apple have it in hand.

Actually a short session on Final Chap 11 produced 360 lines of warnings in the console

Just started chapter 4. Some of the images are teeny tiny. Example screenshot:

Which OS and browser are you using?

Hi Jeden,
I am looking at the .EPUB in Books v 3.2 on an iMac Big Sur v 11.3
Regards,
Robert

Hi there, in chapter 6. “Controls & User Inputs”, under the “Creating the registration view” section, the code just above “Power to the user: the TextField” is wrong.

WelcomeView()

must be

RegisterView()

Best.

Chapter 4 - “Testing Multiple Platforms” section: I targeted “My Mac” and signed per instructions. When I run, I get the following error (fatal Thread 1: signal SIGABRT). My guess is an incompatibility with Catalina? (I’m running Xcode 12.4 on macOS 10.15.7).

dyld: Symbol not found: _$s4Body7SwiftUI3AppPTl
  Referenced from: /Users/fischej/Library/Developer/Xcode/DerivedData/SwiftCalc-ellheujjutgjssbwilccuiuibtva/Build/Products/Debug-maccatalyst/SwiftCalc.app/Contents/MacOS/SwiftCalc (which was built for Mac OS X 14.2)
  Expected in: /System/iOSSupport/System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI
 in /Users/fischej/Library/Developer/Xcode/DerivedData/SwiftCalc-ellheujjutgjssbwilccuiuibtva/Build/Products/Debug-maccatalyst/SwiftCalc.app/Contents/MacOS/SwiftCalc
(lldb)

I believe the project uses a SwiftUI element that didn’t exist under Catalyst on Catalina, so that’s likely the reason as you suspected.

1 Like

Thanks. Confirmed. Got some time to move the project over to a MacBook Air running Big Sur, and everything works as expected.

Chapter 6, section 6.3, “Showing the Keyboard”: The file KeyboardFollower.swift was not in the Starter project (I downloaded the materials a couple weeks ago). I stole it from the Final project.

Chapter 6, section 6.3, near the end of “Showing the Keyboard”: The code example following “For confirmation, the body implementation should look like this:” is different from what has been given before, namely, the VStack declaration now has a content: parameter, and associated parentheses. No explanation given, at least that I saw.