Your first program in Swift on a Mac using a Playground

suggest change

From your Mac, download and install Xcode from the Mac App Store following this link.

After the installation is complete, open Xcode and select Get started with a Playground:

On the next panel, you can give your Playground a name or you can leave it MyPlayground and press Next:

Select a location where to save the Playground and press Create:

The Playground will open and your screen should look something like this:

Now that the Playground is on the screen, press ⇧ + cmd + Y to show the Debug Area.

Finally delete the text inside Playground and type:

print("Hello world")

You should see ‘Hello world’ in the Debug Area and “Hello world\n” in the right Sidebar:

Congratulations! You’ve created your first program in Swift!

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents