Instead of relying on $PATH , whose meaning is not obvious, use the entire path to ios-sim .
Modify your custom script and change:
ios-sim launch ...
to
/usr/local/bin/ios-sim launch ...
The reason that using $PATH can be dangerous (perhaps a word too strong) is because it is not obvious where it is installed. For example, Xcode will use the path that is configured in /etc/launchd.conf and /usr/local/bin may have been added to /etc/profile or ~/.bash_profile .
- Will
launchd use the value in /etc/profile and thus pass it to Xcode for use? - Scripts running with Xcode use
/etc/profile or ~/.bash_profile ?
This complex and deep understanding of this environment will undoubtedly allow you to invoke your command through $PATH , however, using the full path to the command is a simple approach that will always work.
source share