Skip to main content

What is Swift Playgrounds and How Can it Be Used to Teach? Tips & Tricks

Swift Playgrounds
(Image credit: Swift Playgrounds)

Swift Playgrounds is an app designed to teach code to anyone in a fun and engaging way. This effectively gamifies learning to code for Apple devices.

To be clear this is an iOS- and Mac-only coding design tool for Swift, the coding language of Apple apps. So students will be left with real-world skills that can lead to creating working games and more for Apple devices. 

So while this looks great, is easy to use and comes for free, it does require an Apple device to work on and to play the end result.

Is Swift Playgrounds the tool for your needs?

What is Swift Playgrounds?

Swift Playgrounds (opens in new tab) is an app for iPad or Mac that teaches code, specifically Swift, the Apple coding language. While this is a professional coding language, it is taught in a simple way that makes it accessible even to younger students -- as young as four years of age.

Swift Playgrounds

(Image credit: Swift Playgrounds)

Since the whole setup is game-based, it works in a way that intuitively teaches students about the coding process of trial and error as you progress.

Swift Playgrounds is primarily designed to create games and apps but it can also work with real-world robotics, allowing students to code control the likes of Lego Mindstorms, Parrot drones, and more.

Since this app-building teaching tool has live previews it is a very engaging way for students to see what they've built right away -- making it a good option even for those younger students with shorter attention spans.

How does Swift Playgrounds work?

Swift Playgrounds can be downloaded in app format on iPad or Mac, for free. Once installed students are able to start right away with an engaging game in which they are helping to guide a cute alien, aptly named Byte, about the screen using their code building. 

Swift Playgrounds

(Image credit: Swift Playgrounds)

For beginners it's possible to select command lines from a list of options, however, there is also the choice to type in code using the keyboard, directly, for those who are advancing along. The code appears on one side of the screen while the output preview is on the other side, so they can see, live, what they are creating and the effects their code is having.

The alien guidance is a great way to keep students engaged as successful movements result in rewards such as collecting gems, travelling through portals, and activating switches to help progress. 

There are also courses available to get specific outputs, such as for certain games or use of more complex features. If anything is done incorrectly that is clear in the preview that encourages students to think about their mistakes and learn how to correct them -- perfect for self-guided learning in the class and beyond.

What are the best Swift Playgrounds features?

Swift Playgrounds is great fun for building games while effectively playing one as part of the process. But the addition of the device's hardware is another engaging feature. For example, students can use the device's camera to capture an image and bring it into the program part of the game or task.

Swift Playgrounds

(Image credit: Swift Playgrounds)

Well integrated within the app is the ability to share code or screenshots, which is a helpful teaching tool to guide students and also allow them to show their work along the way, when submitting a project for example. It can also be a useful way to create an opportunity for collaboration for individuals or groups to share code with one another.

In the Featured Courses section there is an Hour of Code course that is ideal for beginners that want to try the platform without it taking up too much time. A useful option for in-class use when time is of the essence, or for teaching students that may struggle to pay attention for longer periods.

Apple offers a helpful Everyone Can Code curriculum for younger students that lays out the courses for educators to teach in a structured way that's made to guide students based on their ages and abilities. Everyone Can Code Early Learners (opens in new tab), for example, is a guide for K-3 which comprises five modules: Commands, Functions, Loops, Variables, and App Design.

How much does Swift Playgrounds cost?

Swift Playgrounds is free to download and use, with no adverts. Since this is all about Apple teaching people how to code using its own language, it's within the company's interest to spread that skill. 

The only possible price barrier is in the hardware itself. Since this works on Mac or iPad only, one of those devices will be required to build using this platform and to test any output too.

Swift Playgrounds best tips and tricks

Collaborative group build
Use the code sharing functionality to have students in groups build different parts of a game so the end result is a more complex output which was made by the class.

Build for the class
Use the tool as an educator to create your own games that teach course content that students can learn by playing on their own devices.

Capture progress
Have students take screenshots and share their steps so you can see their work along the way, paying particular attention to when mistakes are made so you can see where they've fixed and learned.

Luke Edwards is a freelance writer and editor with more than two decades of experience covering tech, science, and health. He writes for many publications covering health tech, software and apps, digital teaching tools, VPNs, TV, audio, smart home, antivirus, broadband, smartphones, cars and much more.