I need to restart my app in case I reload something that will require a start from the very beginning. I tried this
let path = NSBundle.mainBundle().resourcePath!.stringByDeletingLastPathComponent.stringByDeletingLastPathComponent
let task = NSTask()
task.launchPath = "open"
task.arguments = [path]
task.launch()
exit(0)
but I get an error upon the open
See Question&Answers more detail:oslaunch path not accessible