Reputation: 1494
I'm wondering if NSTask is not available in playgrounds. This does not compile
import Foundation
let task = NSTask()
Does anyone know if that's not (yet) possible or am I missing something?
Update It's possible to create iOS or OS X playgrounds. One can also change the chosen platform after the initial creation of the playground: Xcode > View > Utilities > Show File Inspector (cmd+opt+1) -> There is a drop down menu for the platform.
Upvotes: 1
Views: 415
Reputation: 25318
I just tried it with an OS X playground (which do exist, past me) and it compiled without issues.
import Foundation
let task = NSTask()
Outputs NSConcreteTask
, and println()
on the task gives <NSConcreteTask: 0x7fe4f1f27360>
. Make sure it is an OS X playground though, as iOS does not include NSTask
Upvotes: 5