I got the app working fine then went to submit to the app store and discovered this thing called the sandbox :-p
I have been reading the documentation and developer forums, but I cant figure out specifically what entitlement I need to add to get this working:
let task = NSTask()
task.launchPath = "/bin/bash"
task.arguments = ["-c",
"defaults write com.apple.screencapture type gif;killall SystemUIServer"]
task.launch()
I've thought perhaps com.apple.screencapture
and com.apple.security.temporary-exception.shared-preference.read-write
as BOOLEAN YES might do the trick, but unfortunately not