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.
Europe’s leading tech festival
TNW Conference is back for its 12th year. Reserve your 2-for-1 ticket voucher now.
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.
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]