NSTask执行shell脚本

NSTask执行shell脚本
报错1: Operation not permitted
解决方法:Your target -> Capabilities -> App Sandbox (Turn the switch off)

报错2:Couldn't posix_spawn: error 13
解决办法:
task.launchPath = "/bin/sh"

你可能感兴趣的:(NSTask执行shell脚本)