iOS Swift Basics An Introduction to Swift Programming Variables

I am writing var str = "Hello, Playground" and it doesn't show on the right column.

the commands I write don't reproduce to the right of the of the screen.

6 Answers

Dan K
Dan K
5,384 Points

On the top right corner of the Xcode window, there is a little symbol that looks like two circles. If you hover your cursor over it, it reads, "Show the Assistant Editor". Click on it. And then, on the left side of the Xcode window, click on the icon that looks like a play button next to your line of code. Then it will display the result of your code like it does in teacher's video. Code results do not automatically show by default when you first install Xcode. You have to manually configure your way so that it displays on your Xcode.

@dan k how can you manually configure so it displays without needing to press the play button. Do you think this issue would get resolved on reinstalling xcode

I suggest you reinstall Xcode.

Thanks, I did and it works now!

Saadoun Alerris
Saadoun Alerris
7,086 Points

If it was your first time opening Xcode it'll take some time to load, give some time like a minute or two.

Thanks Saadoun!

Wesley Turner
Wesley Turner
3,511 Points

I am also having this problem. Have reinstalled twice. In the top bar it does say "Launching Simulator" but it has been saying that for at least 30 minutes now with no change. Any suggestions?

Saadoun Alerris
Saadoun Alerris
7,086 Points

scyborg Tokyo it's quite hidden just keep pressing run button above the debug area and the options will show up.

For those using Xcode 10.2.1 whose results do not show on the right-hand side as in the video.. select:

The overlapping circles in the top right hand corner of xcode (an empty box should pop up)

Then select Live View (located right underneath the overlapping circles)

Then click the play button on the left-hand side of your code (indicated by the triangle inside the circle)

NOTE: Xcode should now print "Hello Playground" NOTE: Have not figured it out yet, but it appears you have to do this with each new file you create.