Skip to content
Thoughtful, detailed coverage of everything Apple for 34 years
and the TidBITS Content Network for Apple professionals

Playing Around with Swift on the iPad

Stating that “We believe coding should be a required language in all schools,” Apple CEO Tim Cook announced during this year’s WWDC keynote that Apple was bringing the Swift Playgrounds app to iPads later this year. Swift Playgrounds is an environment designed to help developers try out code quickly, accompanied by a bevy of lesson materials. And it’s all free.

Since its debut at WWDC two years ago, the Swift programming language has become increasingly popular (see “Swift: Who Is Apple’s New Programming Language For?,” 12 June 2014). In no small part, that’s because of its clarity and simplicity compared to Objective-C, the de facto programming language for OS X and iOS development for years. The first version of Swift debuted with an Xcode feature called Playgrounds that developers could use to write and execute sample code quickly,
a boon both for learning the language and for prototyping code.

Swift Playgrounds for the iPad provides much of the same learning and prototyping capability as the Mac version and puts it on a handheld device. That makes it special already. Being able to craft and test a chunk of Swift code on the iPad and see how it performs is a boon to developers, who often may have programmatic inspiration strike while they’re miles from their keyboards. And that’s all without, mind you, having to run it in an iOS simulator on the Mac.

Add in a customized on-screen keyboard that provides all the special characters programming requires right on the main keyboard and include development-oriented QuickType assistance, and Swift Playgrounds becomes even more attractive. Supplement that with a code-snippet library for drag-and-drop coding, enhance it with a set of templates that offer working code to exploit iOS device features like the gyroscope and accelerometer, and throw in gestural editing (such as dragging to expand the scope of a FOR loop) and you have something really interesting.

Top it all off with the ability to easily import and export Playground code with Xcode on the Mac and you have a winning formula to entice developers to buy more iPads, as well as to lure hardened Objective-C developers to dabble in Swift.

But so much for developers who already know how to code. What about the kids? After all, aren’t playgrounds for kids?

They are, indeed. Most of Apple’s Swift Playgrounds for the iPad announcement and demo at the WWDC keynote focused on the lesson materials that Apple is also releasing with Swift Playgrounds. These lessons start slow, designed as they are for novice programmers at the grade-school level to sink their teeth into. The lessons feature puzzles to be solved and animated characters to be controlled by writing and executing Swift code. Accompanying them is a free book, part of Apple’s new “Everyone Can Code” initiative, titled “App Development with Swift,” as well as two teacher’s guides: “Swift Playgrounds (Teacher Guide)” and “App Development with Swift (Teacher Guide).”

The combination of Swift Playgrounds and its ancillary instructional materials may be a winning formula to attract more schools and families with school-age children into buying iPads. Which is, let’s remember, how Apple funds projects like this.

With Swift Playgrounds for iPad, Apple is working hard to broaden the reach of its app ecosystem to developers and would-be developers at all levels. Just as important, Swift Playgrounds and its instructional accompaniments could well counter the inroads that inexpensive Chromebooks running Google’s Chrome OS have made into the education market, where they have begun to supplant iPads in a number of schools.

Swift Playgrounds is available to developers now, with a public beta coming next month and with App Store availability by this fall, although it may not be tied to the rest of the operating system releases promised for the same timeframe.

Subscribe today so you don’t miss any TidBITS articles!

Every week you’ll get tech tips, in-depth reviews, and insightful news analysis for discerning Apple users. For over 33 years, we’ve published professional, member-supported tech journalism that makes you smarter.

Registration confirmation will be emailed to you.

This site is protected by reCAPTCHA. The Google Privacy Policy and Terms of Service apply.

Comments About Playing Around with Swift on the iPad