Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access Xcode user define build settings from run script in build phase?

I run a script during a build phase.

Xcode lets you define user-defined build settings. I thought I would use these settings to store values or paths that I want to pass to the script.

Is this possible? How can I pass user-defined build settings to script during the build phase? Can you point me at some documentation or tutorial?

I am using Xcode 4.3.1

like image 278
Rahul Iyer Avatar asked Mar 24 '12 04:03

Rahul Iyer


People also ask

How do I get Xcode build settings?

Choose the project in the Project Navigator on the left. Select the Configurations target from the Targets section and click the Build Settings tab at the top. The Build Settings tab shows the build settings for the Configurations target. It's possible to expand this list with build settings that you define.

How do I get build configuration in Swift?

Select the project in the Project Navigator on the left and click the Build Settings tab at the top. Scroll to the user-defined build settings at the bottom of the list of build settings. To add a user-defined build setting, click the + button at the top and choose Add User-Defined Setting from the list of options.


1 Answers

All you need to do is use the appropriate form of the variable name, depending where you are using it.

Eg: $foo in the run script dialog box.

like image 164
Rahul Iyer Avatar answered Oct 01 '22 06:10

Rahul Iyer