At WWDC last week, Apple revealed its all-new Swift Playgrounds iPad app, which aims to help younger users learn how to code in Apple's programming language by making the experience more interactive and fun.
For those unfamiliar with Swift, the open-source language was announced by Apple at WWDC 2014, and developed over four years to be "concise and expressive" in order to make coding for iOS, Mac, Apple TV, and Apple Watch more approachable.
Using Swift Playgrounds, Apple invites users to "solve puzzles to master the basics using Swift" and "take on a series of challenges" to step up to more advanced creations. Swift Playgrounds requires no coding knowledge from new learners, but it also "provides a unique way for seasoned developers to quickly bring ideas to life," claims the company.
Users start out by learning the underlying concepts of coding, like commands, functions, loops, parameters, conditional code, variables, operators, types, initialization, and bug fixing. The learning takes place as users create code on the left side of the screen, while they observe the results on the right side in real time.
Learning to code with Swift Playgrounds is incredibly engaging. The app comes with a complete set of Apple-designed lessons. Play your way through the basics in "Fundamentals of Swift" using real code to guide a character through a 3D world. Then move on to more advanced concepts.
The Swift Playground interface supports the iPad's Multi-Touch capabilities, and lets students tap, drag, or type text and numbers, and then interact with their creations.
For example, tapping a number to edit it brings up a pop-up keypad, while statement boundaries can be conveniently dragged around existing code. Commonly used pieces of code can also be dragged from a Snippets Library to minimize typing.
In addition, a specially designed QuickType keyboard for coding lets users quickly access commonly used characters by holding each key, and intelligently suggests commands in the Shortcut Bar as users type.
Swift Playgrounds also comes with templates that are pre-loaded with advanced code to help users integrate iPad technologies like accelerometer, gyroscope, and Multi-Touch into their programs.
Students can add their own graphics and audio to these templates, and their completed code is readily shareable over Mail, Messages, and AirDrop, and they can also post video to Youtube of their programs in action.
Once users have mastered the basics with the app's built-in library of lessons, they can advance to new challenges that appear in a regularly updated App Store-like area of Swift Playgrounds. Finally, any code created in the app can also be exported to Xcode and vice versa when students are ready to take the next step.
Swift Playgrounds will be available in the iOS 10 public beta this July. The final version of the app is expected to launch for free on the App Store sometime in the fall. You can watch Apple's WWDC demo of Swift Playgrounds in action here.