Mac Format

Swift Playground­s

There’s a real sense of achievemen­t when you complete a task

-

Free FROM Apple, apple.com/swift/playground­s NEEDS macOS 10.15.3 or later

Though it’s taken four years, Swift Playground­s has finally made it to the Mac courtesy of Catalyst, Apple’s initiative for bringing iPad apps to macOS. Designed for coding beginners, Swift Playground­s feels more like a video game than a coding app as it gently teaches you the basic concepts of programmin­g via Apple’s own Swift language, currently in version 5.1.

Swift is used to create apps for Macs, iOS, Apple Watch and Apple TV, but Swift Playground­s isn’t an app developmen­t kit. Think of it as a brightly coloured, user-friendly classroom where you’ll learn the concepts you’ll go on to use in Xcode.

To begin, Apple gives you a collection of introducto­ry modules that introduce you to the basic concepts of coding. These modules, the Playground­s of the app title, get you to control a cute character called Byte using commands such as moveForwar­d( ), turnLeft(), and collectGem( ). Get it right and Byte completes the challenge so you can move on to the next. It’s an excellent way to learn and there’s a real sense of achievemen­t when you complete a task. Additional challenges involve interactin­g with shapes and creating games. There are also Playground­s from other publishers that enable you to control external devices: current third-party offerings include Playground­s for LEGO Mindstorms, Tello drone programmin­g, and Adafruit robots.

Specifics and suggestion­s

Apple hasn’t just ported the entire app across to the Mac. It’s also added some Mac–specific features including Touch Bar support, the ability to drag and drop code snippets into your project, click and drag code wrapping for loops, and conditiona­l statements. There are also code suggestion­s to speed up the time it takes to put it all together. And because it’s on the Mac, it can import, export, and cut and paste between Xcode and Swift Playground­s on the same device. The only thing that the Mac version can’t do that the iPad version can is to use ARKit augmented reality documents, which require the live, motion-sensitive camera view of an iPad.

Swift Playground­s is to Xcode what GarageBand is to Logic Pro: a simpler, friendlier place to experiment and learn before moving up to the pro-level product. CARRIE MARSHALL

 ??  ?? Your first lessons feel more like you’re playing a game rather than learning to code.
Your first lessons feel more like you’re playing a game rather than learning to code.
 ??  ?? Swift Playground­s may start simply, but it helps build knowledge and it doesn’t just cover the very basics.
Swift Playground­s may start simply, but it helps build knowledge and it doesn’t just cover the very basics.

Newspapers in English

Newspapers from Australia