Get the Lowest Prices anywhere on Macs, iPads and Apple Watches: Apple Price Guides updated February 24th

Swift Playgrounds is a development environment for Swift that was released to macOS within Xcode on June 2, 2014, and later ported to iPad on September 13, 2016. 

The goal of Playgrounds is to help users learn to code Swift, Apple's general-purpose, compiled programing language. By learning Swift, users will be able to code apps and programs for iOS, iPadOS, macOS, watchOS, tvOS, and Linux. 

Swift Playgrounds can also be used to quickly prototype both program functions, as well as user interface and user experience elements.


Swift Playgrounds on iPad, showing a user how to code a 'for loop'Playgrounds on iPad, showing a user how to code a 'for loop' command

Swift Playgrounds allows novice coders to test and render code in real-time. It can evaluate and display the results of a single expression as it is coded, giving immediate feedback to the coder. 

This can decrease development time for experienced users, allowing them to maintain a constant workflow without needing to resolve themselves to an arduous and inefficient trial-and-error process.

Typically, this kind of development environment is referred to as read-eval-print-loop, or REPL, and is lauded for its ability to encourage experimentation and learning. It also is particularly beneficial when it comes to quickly prototyping code with instant feedback.


Swift Playgrounds bundled with XCode 11Playgrounds bundled with XCode 11

Swift Playgrounds is available both on iPadOS and bundled with Xcode for macOS. Originally introduced and bundled with Xcode 6, the macOS version of Playgrounds was designed to give developers a place to quickly code and receive immediate feedback without needing to recompile every time the developer tweaks the code. Another upside is that it gave developers a quick way to test out user interface elements without needing to build the entire program first.

When Swift Playgrounds came to the iPad, it was touted as both a development environment as well as an educational tool. The app allows users to download lessons and challenges which can be accessed offline at a later date. 

Swift Playgrounds for iPad comes bundled with a few lessons that teach young or inexperienced coders the basics of coding syntax. Coders will assist three characters, Byte, Blu, and Hopper, in achieving simple goals such as navigating to goals or collecting gems. These goals can be completed by filling in code and debugging scripts, teaching coders the basic syntax of coding.

Topics covered

Additional lessons that can be downloaded via a Swift Playgrounds subscription Additional lessons that can be downloaded via a Swift Playgrounds subscription

Swift Playgrounds on the iPad starts out teaching novice coders about code syntax, simple commands, functions, loops, parameters, conditional coding, variables, operators, types, initialization, and how to fix bugs in code.  

After mastering the fundamentals of Swift, users can download additional topics via "More Playgrounds" within the iPad. This allows users to use Playgrounds to learn more advanced topics, including ARKit, MapKit, camera access, and the ability to work with third-party accessories. 

Third-party accessories

Swift Playgrounds and the Lego Mindstorms EV3 Novice coders can use Swift to control the Lego Mindstorms EV3

For young coders, several third-party companies have created products to use alongside the iPadOS Swift Playgrounds App.

One such third-party device is Lego's Mindstorms EV3 kit, a programmable brick that features three motors, a touch sensor, a color sensor, an infrared sensor, and a remote control. The kit also includes snap-on parts enabling users to build a variety of robots.

Another is Sphero, a company that creates a series of robots and toys that are capable of being controlled both through Swift Playgrounds and Sphero's apps.


Students working in Swift Playgrounds in the classroom Students working in Swift Playgrounds in the classroom

Apple suggests students aged eight or older should be able to use Swift Playgrounds for the iPad and encourages schools and teachers to incorporate their Everyone Can Code curriculum into the classroom.

Thanks to a large library of additional lessons that can be purchased from the Swift Playgrounds subscription, even veteran coders can learn additional skills by downloading third-party lessons.

Apple has also made versions of Swift Playgrounds that are available to students who are visually impaired or hard of hearing.

Currently, Swift Playgrounds is available in English, Dutch, French, German, Italian, Japanese, Korean, Portuguese, Simplified Chinese, Spanish, Swedish, Thai, Traditional Chinese, and Turkish. 

Essential Reading