This article was published on February 8, 2016

Xcode 7.3 beta build adds awesome new Interactive Playgrounds feature for Swift apps


Xcode 7.3 beta build adds awesome new Interactive Playgrounds feature for Swift apps

Xcode 7.3 beta 2 is out, and adds one feature developers using Swift will really enjoy: Interactive Playgrounds.

While Playgrounds have been a favorite for testing code for some time, it was a fairly static I/O protocol for making sure the code was correct. Now, you can test to see if the code you put in will actually perform while in use.

Apple also has a nifty example of how Interactive Playground will work. So long as you have the Xcode 7.3 beta 2 installed, the NewtonsCradle.playground file is a good example of how you can actually test code in Playgrounds.

It’s not as easy as writing code and crossing your fingers, though. Apple notes you’ll have to assign a liveView property to the XCPlaygroundPage where your code is, but that’s about it. You can even tweak your code and see results in real-time, and it will work for both iOS and OS X apps.

The 💜 of EU tech

The latest rumblings from the EU tech scene, a story from our wise ol' founder Boris, and some questionable AI art. It's free, every week, in your inbox. Sign up now!

An extremely cool addition to Xcode, Interactive Playgrounds could also accelerate the app building process. If you test in Playgrounds, there’s less chance of technical debt (someone please slap me for saying that) in your codebase.

Interactive Playgrounds [Apple]

Get the TNW newsletter

Get the most important tech news in your inbox each week.

Published
Back to top