How do I read the output of a swift playground in the latest version of Xcode?

By KE8UPE, 26 November, 2020

Forum
App Development and Programming

Hello,

For awhile now, I've wanted to learn swift, so I could create accessible versions of the games I played with my family, as a child.

I recently discovered the amazing, free tutorials offered by hackingwithswift.com, and downloaded the "unwrap" app, which allows you to read &/or watch the tutorials on-the-go.

I completed the very first section, which discusses variables.

However, I want to make sure that the code I entered is correct.

My problem is, that I cannot figure out how to read the output of my code, when using a playground.

Does anyone in this fantastic community have experience with this, that would be able to give me a hand?
I'm using xcode 12.2.

Thanks for any & all information you amazing, talented people can provide.

Options

Comments

By Greg Wocher on Monday, November 23, 2020 - 01:46

Hello,
When you are in the editor typing in your code, you press command plus shift plus return to run it. Once it runs you stop interacting with the editor. Once you stop interacting do a VO plus right arrow to move to something that should say playground sidebar group. Interact with this group and you should see something that says playground results and you need to interact with this. Once you do, you should be able to see your results. There also might be a few instances of the playground results depending on how many different code blocks got executed. If you want to see the result of just one line, use the command shift plus return at the end of the line of code you just wrote.

Hello,

Thank you so much!
That worked perfectly!

I love AppleVis, and am so thankful to be able to participate in this wonderful community!