Learn to code in Swift Playgrounds on Mac
If you don’t know how to code, you can start with the tutorials in the Learn to Code & Build Apps section. They’re designed to help you learn the basics of coding and prepare you to create apps of your own.
In the Swift Playgrounds app on your Mac, go to the More Playgrounds window.
If you’re in the My Playgrounds window, click See All near the bottom right.
If you’re working in a playground, choose Window > My Playgrounds, then click See All near the bottom right.
Click a tutorial in the Learn to Code & Build Apps section to view a description.
To see more tutorials, scroll right.
These tutorials are especially helpful for learning to code:
These tutorials are especially helpful for learning to code:
Get Started with Code: Learn the basics of coding through fun, interactive lessons. Help a character navigate a beautiful 3D world by writing code in Swift, the programming language used by millions of developers around the world to create apps. Learn coding concepts, like variables, loops, conditionals, and functions.
Learn to Code 1 and Learn to Code 2: Practice writing Swift code through a series of lessons, each of which focuses on a different coding concept and builds on what you’ve learned. Some of these lessons are also in Get Started with Code, and they reinforce what you learned there.
Click to return to the More Playgrounds window, then click Get to download the playground to your Mac.
Double-click the playground to open it.
The tutorials Get Started with Code, Learn to Code 1, and Learn to Code 2 are made up of chapters, each of which teaches a coding concept, starting with an introduction.
To see the chapters and pages when you’re in these playground books, click near the top left to open the left sidebar. (Clicking it again closes the sidebar.)
To learn about a coding concept, click the Introduction in the chapter about that concept. Click at the bottom of the window to page through the introduction. When you’re ready to try adding your own code, click Start Coding at the end of the introduction.