What's new with Swift Playgrounds?
March 2018: Apple announces AR support for Swift Playground!
Apple announced that AR support (using ARKit) is coming to Swift Playgrounds! Not only will kids be able to see 3D models of Byte (the character that the code manipulates) but they will also be able to use the iPad camera to showcase Byte's virtual world within the real world.
ARKit for Swift Playground: Everything we know so far
March 2017: Apple has just made Swift Playgrounds available in 5 additional languages
Swift Playgrounds for iPad — although the words "one more thing" weren't said out loud before its introduction at WWDC 2016, that's exactly the importance it was given. And deservedly so.
Tim Cook, Apple's CEO, announced it, and Cheryl Thomas, vice president of software engineering operations, showed it off: A technical marvel with a coding environment, made multitouch, directly manipulable, and fully accessible, melded with an educational miracle, teaching coding itself in a way that's engaging, empowering, and approachable to everyone.
It's not just the mainstreaming of technology — something Apple has proven themselves good at a ridiculous amount of times over the last few decades — but the mainstreaming of the tools used to drive the technology itself.
I had a chance to preview Swift Playgrounds on iPad, to attend the WWDC sessions and talk to developers at the labs. I also spoke with Cheryl Thomas; Tim Triemstra, who manages product marketing for developer tools; and Wiley Hodges, director of product marketing for tools and technologies.
Thanks to all of that, I now get to share some early thoughts on Swift Playgrounds with you. And, frankly, to gush. A lot.
BASIC, Logo, Hypercard, the web — in the early days of personal computing, it felt like everyone was learning to code and discovering something new and exciting all the time. But those days faded and, for a decade or so, there wasn't a great way for beginners, especially kids, to get into code.
Apple's new programming language, Swift, was deliberately crafted to fix that. It was crafted to fix other things as well, of course, but from the moment it hit the stage at WWDC 2014, it was immediately — spectacularly — obvious just how empowering it could be for education and for everyone.
And a large part of that was "Playgrounds".
Playgrounds isn't an entirely new concept, but it's radically new at mainstream scale. Playgrounds provides a live view of what your code is doing, up to, and including, animation and interactive 3D models.
On the Mac, it lives inside Xcode, Apple's traditional programming environment. This fall, along with iOS 10, it's coming to the iPad App Store as well.
It's not just as a developer environment either. Apple is also providing a ridiculously well-considered, ongoing educational environment to go along with it.
And that was the plan from the beginning, according to Thomas.
If a smile hasn't already burst across your face, consider: Soon, anyone with an iPad, even if they've never thought about programming before, will be able to very literally fingerpaint with code, and, more importantly, learn how to make art.
That's apparent from the moment you launch the Swift Playgrounds app. The first screen you land on is the Featured tab. It looks just like the App Store, showcasing both lessons and challenges you can download and get started on.
The second tab is My Playgrounds, which stores the lessons you've already downloaded, as well as custom projects you've built all on your own. It looks like Keynote or Pages, with templates to help bridge the gap between lessons and full-on flying solo.
All of that was intentional according to Triemstra. The team wanted Swift Playgrounds to be immediately familiar and instantly approachable to as many people as possible. Since pretty much everyone already knows how to use the App Store, and many know how to use the iWork apps, there's no barrier to using Swift Playgrounds. You dive right in.
Also, because you can edit and rename anything in My Playgrounds, you can make even a single iPad multi-user. Each child can have a copy of a Playground named just for them, with their own progress and at their own pace.
The tools inside Playgrounds are fiercely cool as well. There are QuickType predictive suggestions for code, so what you want is often exactly what you'll see. Developers can even control what's available for suggestion, so they can optimize for their Playgrounds.
There's a new keyboard that makes entering a number or symbol as easy as tapping and swiping it up. You can edit in place with context-sensitive popup menus and attribute pickers, so you can easily add options for values, complete statements, and even choose colors. You can also drag and drop code elements, which is incredibly intuitive behavior on iPad.
Swift Playgrounds works in Split View with other iPad apps, of course, but it also works as a split view, giving you a Swift coding window on the left and a Playgrounds window on the right. Using the same touch-and-hold mechanics as Split View, the operating system-level feature, you can drag the code or Playground window full screen.
In a delightfully clever departure from how the main Split View feature works, if you rotate to portrait, you don't get two skinny windows. You get two full-width windows with Playgrounds stacked on top of Swift coding.
Sharing == Caring
Sharing is profoundly human. Sometimes an experience doesn't feel real until we share it. It's why we have partners and families and teams and offices and classes. It's especially important for learning, where insight doesn't just come from the lessons we learn but from the lessons learned and shared by those around us. It would take an eternity, after all, to discover everything all on our own.
With Swift Playgrounds, you can share anything in My Playgrounds with anyone you like over email, iMessage, or AirDrop. That's great for sending your latest awesome creation to a sibling across the room, or your quick prototype to your fellow engineer across the country.
Since Swift Playground lessons take the form of "books," you can also create and share your own lessons, customized for your own kids, classroom, course, team, or the world at large.
Hodges explained the sharing is absolutely safe. Though Swift Playgrounds provides the full power of the iOS SDK, it's also fully sandboxed, and there are a few things that are off limits. That way, for example, no one can use Playgrounds as a way to try and steal any contacts or personal information, or to try and get any malware onto anyone's system.
In a world where privacy and security are continually devalued, it's great that Apple is not only alleviating even the potential for concern from anyone who still understands the critical importance of both, but protecting those who don't even think about it at all anymore.
There's another, even more exciting way to share Swift Playgrounds: ReplayKit. That's Apple's screen recording technology introduced last year for games. With it, you could record what you were playing and send it to your friends. Coming this fall, ReplayKit will let you stream what you're playing live to popular video platforms, and your Swift Playground sessions, too.
Anyone who's seen a child watch Minecraft videos while playing Minecraft, or sit endlessly in front of a Twitch or YouTube stream knows how powerfully engaging it can be.
Imagining that power and engagement for code? Chills.
/* Inclusivity */
Accessibility was baked into Swift Playgrounds from the start, according to Thomas. Part of making coding open to everyone is making coding open to everyone. That naturally extended to diversity as well, according to Triemstra.
When you start the first lesson you meet a character named Byte. Apple could have used something akin to a scrappy, mustached plumber or optional bright, pink-hatted princess, but those would reflect only a tiny sliver of the user base. Apple could have also defaulted to a simple geometric shape labeled "Object 1," but that would have been bland and uninspired. So, like with Siri, Apple went with personality, and they took it a step further.
Byte looks like a golden pear with a sea blue eye, yellow front pack, wide mouth, tiny legs, and floppy noodle arms. That's something any child, any person, can relate to regardless of who they are or what their background is. With a tap, though, pear-Byte leaps up to an island in the sky where you can choose from two other versions — a similarly cyclopean raindrop with a messenger bag, and a green, two-eyed, hammer-headed backpacker in what looks like a button-down cummerbund.
That leaves you free to identify with any of the Bytes, any way you like. That was an especially important design goal, according to Triemstra. There's little point in making a technically approachable environment if, the minute someone uses it, they can't see themselves reflected in it.
This way, Byte can be anything you want, including you. And when you add the code, Byte can do anything you want as well.
It makes the experience less like work and more like play. I found myself cheering when Byte collected the gem, flipped the switch, and went through the portal. Even finding and fixing bugs was like beating a level in a game, motivating me to keep trying, and to continue on to the next level — er, lesson — as soon as I finished the last.
And only occasionally, with incredible joy, would I realize it was me — me! — writing code.
Hodges made it clear in our conversation that Swift Playgrounds for iPad is the full, real Swift. It's not Swift Jr. or Swift Lite, or any extract or dilution. It's the full power of the iOS SDK at your fingertips.
The lessons and challenges, which, according to Thomas, were prepared alongside educational experts both inside and outside of Apple, and field tested by kids of all ages, are an ongoing effort. More of both are on the way, and will be updated and added to for a long time to come.
So there's no need to worry that Swift Playgrounds will be delivered with a lot of excitement but will eventually be abandoned as Apple turns its attention elsewhere. Like privacy, education is core to Apple's culture.
That extends to the team, Triemstra said. Swift Playgrounds wasn't farmed out. It wasn't a secondary or tertiary project. It was built by Apple's own, internal engineers. The ones that have built some of the most important features we use on a daily basis.
Rumor has it, in fact, that the teams behind Swift Playground included serious talent. Code and education matter to a lot of people at Apple, not just at the executive level but at every level. They went to Apple to dent universes, and things like Swift Playgrounds are top-of-the-list for many of the very best designers and engineers.
There's an optimism — almost a nobility of purpose — that radiates from the entire project. And it shows in every part of the app, from concept to design, content to coding, execution to delivery. It sings. It dances. It makes you giddy with potential.
It's the full stack.
I have so much more to say about Swift Playgrounds for iPad that I'm going to stop now, or I fear I'll gush forever. No app has ever had me more excited or more hopeful for the future.
The potential seems limitless, which is something that came up in my conversation with Cheryl Thomas, and that's beyond exciting.
Needless to say, I'll be expanding on this preview and writing a lot more in the months to come.
For now, if you're interested in an early look and you have an extra iPad to spare, you can download the iOS 10 public beta (opens in new tab) — here's some help if you need it — and have at it. Playgrounds is built right in. Otherwise, Swift Playgrounds will be available separately, for free, on the App Store this fall following the final release of iOS 10.
It's one of the finest things Apple has ever done, and it's going to change the way coding is done for the next generation.
Rene Ritchie is one of the most respected Apple analysts in the business, reaching a combined audience of over 40 million readers a month. His YouTube channel, Vector, has over 90 thousand subscribers and 14 million views and his podcasts, including Debug, have been downloaded over 20 million times. He also regularly co-hosts MacBreak Weekly for the TWiT network and co-hosted CES Live! and Talk Mobile. Based in Montreal, Rene is a former director of product marketing, web developer, and graphic designer. He's authored several books and appeared on numerous television and radio segments to discuss Apple and the technology industry. When not working, he likes to cook, grapple, and spend time with his friends and family.
Very reasoned and well said!
As someone who has never had a desire to learn programming, I'm actually excited to try this out, just to see what I could ultimately design and build. Sent from the iMore App
Poor English (although good report)
Should be 'number of times' - it is wrong to say 'amount of times'
'Amount' refers to stuff (amount of sand for example) whereas 'number' refers to things (number of apples for example).
Oh come on ! It's not an exam
Seriously?! I think you've missed the point of grammar and language, which is to *communicate*. There is no confusion in this case by what is meant by "amount of times" though your explanation that tries to make a distinction using "things" and "stuff" is incredibly vague. Bad comment.
I like Swift Playgrounds, I used to provide advanced .net technical coding courses a few years back, and I think the approach Apple has adopted is comprehensive, innovative, and powerful. What I am not yet convinced about is that we need to have coding for everyone. I heard Tim Cook talk about this at the StartUp Fest in Amsterdam this year, but I struggle to understand the assumption it is a natural progression. If we look at coding over history we have become more and more abstracted through high level languages from what the processor is actually doing - this is a good thing I believe, but if taken to it's logical conclusion then we will reach a point where humans are not involved in the coding at some point. Instead we would just define the functionality we want and the computer would create the code. So "Coding for everyone" seems to me to be fundamentally swimming against the tide. Perhaps it is premature, and perhaps Playgrounds is phase 1 of a bigger plan, but I think a better goal would be to find ways that allows anyone to define functionality that AI (IA?) can interpret and produce for us... now that would be exciting!
I agree that "Coding for everyone" may be unrealistic -- maybe for "everyone who wants or needs to code".
But step back a bit. The first set of lessons (playgroundbook) doesn't really teach you to code -- rather it teaches problem analysis and problem solving.
Then play around with the "Drawing Sounds" playground book. Ignore the left panel and tap the various green "keys". Now, imagine the keys were presented as the keys of a piano keyboard and the sounds were the correct tone for each key. Then imagine that the left panel didn't show any code -- instead, just instructions on how to play the piano ...
Do the same with the purple "keys" and imagine the teaching instructions were for parsing sentences, language translation or vocalization similar to Proloquo2Go:
In the "Learn to code" playgroundbook the only interactions allowed (with the display panel) were to pan, rotate and zoom the 3D world as a whole (and start/stop)
In the "Drawing Sounds" playground book, the user can interact with individual components of the display panel. This interaction is recognized, sent.to the code running in the left panel (could be hidden), processed then sent back to the display panel, which displays the results ... Kind of a glorified IFTTT.
Now consider: The "code panel" is running a program written in Swift with all it's power; the "display panel" is showing anything available in the iOS SDK -- text, pictures, sounds, movies ...
SP is an "interactive learning machine"!
What you "learn" depends on the playgroundbook -- and it can be anything from playing a piano, a history lesson or how to fix a leaky faucet.
Thanks - I agree there are fantastic opportunities for amazing playground books (though, I guess, they will need to be a way to package them for use for people who just want to fix the leaky faucet, and not understand the code that creates the program that teaches them how to do that - in which case isn't this just an app?) I was attempting to make a wider point that the promise of intelligent assistants is that they do more and more for us, and so naturally would be "writing the code" for us based on our requests. So we may in the future ask: "Hey Siri, as you know I can play guitar, but could you teach me how to play piano?" and then the IA effectively creates a new app to do that for us (rather than searching an app store). If that is a real vision, then the number of people who need to understand how to code reduces in the world, rather than expands :)
The difficulty is ramped up too quickly for a child.
Thanks Rene! I've put the Beta on my iPad and am trying out Swift Playgrounds. It's great! I'm 72 years old, it's about right for me.
Is there a version of swift playgrounds for mac OS? My iPad is too outdated, I installed i0S10 beta but it did not install swift playgrounds.
I don't believe so - iPad only as far as I know
Good article, thank you. Question: Am I the only one who noticed that Playgrounds is broken since second public beta? No compiling, coding suggestions unavailable …
Same here, Swift Playgrounds is pretty much useless temporarily on my iPad Air 2. Which iPad do you have? It might be a device specific problem if you have an iPad Air 2 as well.
Answered at the wrong place. Please see my latest post. Or just download latest training content on Featured tab in Playgrounds. That will probably solve the problem …
I have solved same problem by your advice.
My iPad is Air1.
Thanks a lot.
Hey Fran, thanks for answering. Yes, I have an iPad Air 2 but it's not a device specific thing. I sent a feedback to Apple and got the answer that going to Featured tab and downloading the latest version of training content would solve any compiling errors. And it sure did.
Get the best of iMore in in your inbox, every day!
Thank you for signing up to iMore. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.