In Xcode, I know that you can get variables such as PROJECT_DIR
to use in some situations, such as a run script build phase. I am wondering if it's possible to get the build type (i.e., Release or Debug). Any ideas?
Select your project or target from the left side of the editor. Click the Build Settings button at the top of the editor. Click the Add Build Setting button at the bottom of the editor and choose Add User-Defined Setting.
See variable values in code and the variable viewer When your app pauses at a breakpoint, hover over a variable in your source code to view its current value. If the variable is an image or other type that isn't expressible as text, click the Quick Look button at the upper-right to see a preview of the variable.
Print a variableClick the Add Action button and select Debugger Command. Put any print command in a debug console in a text field. Make sure you prefix it with po , e.g., po print(view) . Check Automatically continue after evaluating actions.
The best source is probably Apple's official documentation. The specific variable you are looking for is CONFIGURATION.
Here's a list of the environment variables. I think you might want CURRENT_VARIANT
. See also BUILD_VARIANTS
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With