Site Overlay

Swift Playgrounds for iPad

Apple has recently released their new Swift Playgrounds app for iPad, which teaches people how to write code. But did you know it contains a full Swift compiler?

‎Swift Playgrounds
‎Swift Playgrounds
Developer: Apple
Price: Free

If you create a new playground, you can enter any Swift code you want. This means that it has an embedded Swift compiler, and even has access to all the frameworks available to normal native apps.

See how easy it is to create a UIViewController with some content in it. This is real code – the only “playground” code here is the single line for displaying the view controller.

This is the closest we have come to native app development on the iPad. Who knows, maybe one day Apple will release Xcode for the iPad…

Since it’s a full Swift compiler, even private APIs can be used. This playground plays Siri’s starting tone when you press Run My Code.