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
launch path not accessible
launchPath
must be the full path to the executable, compare stackoverflow.com/questions/28971335/… for a similar issue.