Reputation: 3773
I have a run script in my Xcode project's Build Phases. I want to make it run only on machines where a custom environment variable is set.
In my ~/.bash_profile
file I have
export MY_VARIABLE="TRUE"
There is an appropriate check in the Xcode's run script:
if [ "$MY_VARIABLE" != "TRUE" ]; then
exit
fi
I tested this code in Terminal, and it works well, but Xcode's run script does not see $MY_VARIABLE
.
Does anybody know how to make it visible in the run script?
I tried the approach recommended in this answer but it does not work for me: XCode doesn't recognize environment variables
Thank you!
Upvotes: 1
Views: 2462