Xcode uses the wrong PATH when executing a script run

When I try to run the run script phase in Xcode 7.1 on Yosemite, I seem to use the wrong PATH ...

When I return $ PATH from the script, I get the following:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

I have a zero idea of ​​how to fix this, and I tried as many as a hundred different solutions, such as adding a custom build variable, opening Xcode from a terminal, etc. Any suggestions?

+4
source share

Source: https://habr.com/ru/post/1613514/


All Articles