Is it possible to set-up a build setting from a pre-action/build phase in Xcode?

21 hours ago 2
ARTICLE AD BOX

I'm not sure what's the best practice around here but essentially the problem I have is I want to have a tool that generate a path (an unix domain socket) and set it in COMPILATION_CACHE_REMOTE_SERVICE_PATH for the build settings of the target I'm building. On xcodebuild calls it's as easy as just passing it as an environment variable, but is it possible to do as a script inside of Xcode I can set in pre-actions for that scheme or as a build phase?

So I can do something akin to:

export COMPILATION_CACHE_REMOTE_SERVICE_PATH = "$(/usr/bin/my-tool connect)"

and that will be used as the value for the build.

Read Entire Article