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
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 🧐