NSTask执行shell脚本

2021-06-29  本文已影响0人  ONE2

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"

上一篇 下一篇

猜你喜欢

热点阅读