Apple today previewed their new “Swift Playgrounds” app for the iPad, which aims to introduce users to coding applications in the Swift programming language.
The app, shown onstage during Apple’s Keynote Address at WWDC 2016, is an “innovative new app for iPad that makes learning to code fun and easy for anyone.” The app allows students and beginning programmers to explore the Swift programming language, which is Apple’s development language used to create apps for its, Mac, iOS, Apple TV, and Apple Watch devices.
Swift Playgrounds includes Apple-developed programming lessons where students write code to guide onscreen characters through an immersive graphical world, solving puzzles and mastering challenges as they learn core coding concepts. The app also features built-in templates to encourage users to express their creativity and create real programs that can be shared with friends using Mail or Messages or even posted to the web.
A library of lesson helps students learn coding concepts, such as issuing commands, creating functions, performing loops and using conditional code and variables. Apple will release new challenges to help students refine their coding abilities. Educators and developers can also create their own challenges via Xcode.
Swift Playgrounds also includes a number of built-in templates to allow students to modify and build code to add their own graphics and touch interactions. The app allows users to build a variety of interactive programs.
You can create empty playground documents or start from one of the built-in templates with scaffolding for graphics and user interface to build powerful apps that respond to touch and accelerometer or that control Bluetooth devices. And since Swift Playgrounds uses real Swift code, projects can be exported directly to Xcode to create programs for iOS and macOS™ that can ultimately be turned into full-fledged apps.
While users can create entire programs with only a few taps, a new coding keyboard allows users to quickly type additional characters common to Swift programming by swiping across the key, while a shortcut bar presents the most likely next commands or values based on context.
And, using a pop-over keypad, you can simply tap to edit a number in place, touch a color value to display a color picker, and even drag the boundaries of a loop or function definition to wrap around existing code. You can also drag from a library of common coding snippets to create new, powerful code with little or no typing.
A preview release of Swift Playgrounds is available today to Apple Developer Program members as part of the iOS 10 developer preview and will be available with the iOS 10 public beta in July. The final version of Swift Playgrounds will be available in the App Store for free this fall. For more information including videos, images and demos, visit, apple.com/swift/playgrounds.