TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Playground won't run

Forums > Swift

Hello everyone! I'm slowly learning Swift, but one difficulty I've encountered is not being able to use Playgrounds in Xcode. Even though it's set to "Automatically Run", I see nothing in the results pane; it also doesn't show anything when I click the play button in the line numbers. So while I'm feeling very sheepish to post this, hopefully someone can help and this thread will help other beginners if they get stuck like me.

Thank you very much.

Ben

Screenshot

2      

Hi Ben,

first you have not told it to display in console add

print(c)

the other thing that you may have to wait as it sometime a bit slow.

2      

Thanks very much, I added print statements below and still no dice. I do think it's something more, though, because in all the coding videos I've watched it's very uncommon to see people use print statements like that. I also sometimes see "dump", which also has no effect in my Playground.

I will keep trying and report back if I stumble upon a fix...

Screenshot

2      

Hacking with Swift is sponsored by Blaze.

SPONSORED Still waiting on your CI build? Speed it up ~3x with Blaze - change one line, pay less, keep your existing GitHub workflows. First 25 HWS readers to use code HACKING at checkout get 50% off the first year. Try it now for free!

Reserve your spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.