UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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 RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

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.