Can't launch playground with Chapter 6

Hello. When I’m launching and then it opens playground, I see an error (look at picture below). I tried to clean build as mentioned in the book, but it didn’t work. Am I doing something wrong? Xcode 9.4.1.

@freak4pc Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hey @turrik. Are you using the v1.1 of the book and script?

Did you try ./ clean ? Can you show a screenshot of the script running and also attach the generated log file?


1 Like

Hi, I have another issue with chapter 6 playground. I’m not able to run the playground. I see such log:

Console log
Playground execution failed:
error: /var/folders/g_/b3bf8lw538v89m8l5846h4fh0000gn/T/playground1-b6900c…swift:3:8: error: no such module 'Playground_Sources’
import Playground_Sources

I see the same log using Xcode 9.3, Xcode 9.4.1 and Xcode 10 beta 5. Could someone help me figure out what’s going wrong. I use v1.1 of the book and tried ./bootstrap clean.


me too! Am getting the exact same issue with Xcode 9.4.1

using v1.0 of the book
have tried tried ./bootstrap clean & restarting Xcode

I was doing fine up until Chapter 6, then I got this issue too!

I tried to do some troubleshooting, but in the interest of saving time, I copied the “Playground” file from chapter 6, renamed it, then copied it into my Chapter 5 folder. It seems to be working from this folder just fine.

Hope this helps others!

Hmm, seems to be mostly working…

When I try the code to observe a change, like this:

try! realm.write { article.title = "Work in progress" }

I actually have to execute that line twice. The first time, it does not seem to be “observed” - but the second time it works as advertised.

Heh, figured this one out… I had changed PlaygroundPage.current.needsIndefiniteExecution = true to false while I was troubleshooting the other issues. Doh!