Is there a way of grabbing the current scheme from a run script phase?
I\'ve tried $(SCHEME_NAME) but it doesn\'t exist.
INTERMEDIATES_OUTPUT_DIR doesn't seem to work for building swift previews which I wanted customization on as well. I ended up doing something similar using defaults write which I found works in all cases and doesn't involve the creation of a file.
Prebuild:
defaults write com.apple.dt.Xcode LastBuildScheme "MySchemeName"`
Build Script:
[[ $(defaults read com.apple.dt.Xcode LastBuildScheme) = "MySchemeName" ]] && echo "Scheme" || echo "Not Scheme"