1

I'm writing a Today Extension that needs to call 'killall Finder' sometimes. I've written an app and taskbar extension that use it without a problem. However, when I use it from the Today Extension I get an error message -TERM 3205: Operation not permitted

Part of the code I'm using inside a function:

let task = NSTask()
task.launchPath = launchPath
task.arguments = Array(arguments)
task.launch()
task.waitUntilExit()

But calls like echo 'hey there' and say 'hi' do work so I'm guessing it has to do with root access.

The code with the NSTask function in it is a shared .swift file in the main application.

Can I add some sandbox rules to enable this behavior, change the NSTask code used, maybe use some kind of XPC service or do something else to make it work?

xaddict
  • 1,302
  • 3
  • 19
  • 38
  • http://stackoverflow.com/questions/3541654/how-to-give-permission-using-nstask-objective-c – Gnark Apr 29 '15 at 09:17

0 Answers0