NSTask launch path not accessible
add this line before [task launch]
:
[task setLaunchPath:@"/bin/sh"];
What you will need to do is get the shell binary, and pass your script as an argument. So if the shell script is written targeting bash, get the bash interpreter, and pass it an argument list with one argument: the path to your script.sh.