π Xcode Build Variables
How often do we need to use Xcode build Variables? One of the most used cases is when we need to build a New Run Script Phase, variables like $SRCROOT
, $PROJECT_DIR
and SWIFT_VERSION
are used by many people, but how many of those variables exist? is this a static list? π€―
So the answer is NO, this is not a static list, in fact, this is based on your project, of course, there is a list of variables that are the same in all projects, but as you know you can define your own Build Settings π
Letβs create a new Build Setting called MYPROJECT_SETTING
with the value of Testing
. Just go to Build Settings, find the (+), choose Add User-Defined Setting, and then create the variable, done πͺ
Now how about the other build variables? how we know them, easy peasy, just open terminal, do this.
You should get a list of all variables.
Thatβs all π§