I'm trying to launch a command line app from my objective C application (sandboxed) using NSTask and I keep getting "launch path not accessible"
Here is the path:
[task setLaunchPath:@"/usr/local/bin/codeview"];
I have set the appropriate attributes for codeview and it is working perfectly when I use it from the command line and /usr/local/bin IS in the $PATH
I know I have NSTask configured correctly because this WILL work:
[task setLaunchPath:@"/usr/bin/hexdump"];
With the exception being that I'm using a command already in /usr/bin. But I can't copy codeview into /usr/bin due to SIPS.
I've tried moving codeview to various other non-SIPS protected locations all to no avail. Must all NSTask commands come from /usr/bin? Where might I put codeview so that it can be launched.
Today I'm going to use an older computer and disable SIPS to put my command in /usr/bin and see if that works. If it does. I will do it on my main machine.
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags:
Entitlements
Objective-C
Command Line Tools
App Sandbox