Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use .xcconfig files in Xcode 4?

I just switched over to Xcode 4 and I'm having trouble working with .xcconfig files for build settings. My targets that already had files assigned in Xcode 3 are all set up - a column titled Config.file shows up in the Levels view of Build Settings. But I can't figure out how to edit the columns in this view or where to put an .xcconfig file to attach it to a new target. I've looked online and haven't found an answer. Anybody know how to do this?

like image 843
Luke Avatar asked Jun 01 '11 21:06

Luke


People also ask

How do I use Xcconfig files?

Creating and using your xcconfig file To create an xcconfig file, choose File -> New -> File... in your project. In the new file dialog, scroll down until you see the Configuration Settings File in the Other section. You can add configurations for pretty much anything you want.

How do I create a .xcconfig file on a Mac?

To create the XCCONFIG file, open the project you want to create the XCCONFIG file for, select File → New → File..., choose "Other" (under iOS and OS X), select "Configuration Settings File," name the file, choose the save location, and click Create.

What is Xconfig file?

Xcode build configuration files, more commonly known by their xcconfig file extension, allow build settings for your app to be declared and managed without Xcode. They're plain text, which means they're much friendlier to source control systems and can be modified with any editor.


1 Answers

Pick File | New, choose Other and "Configuration Settings File", this gets you a new .xcconfig file.

Then click on the project on the upper left in the file browser (the same place where you get to build settings), click on the project again in the second-to-left panel, and click on the Info tab at the top of the inner panel.

There, you can choose "Based on Configuration File" for each of your targets for each of your configurations (debug, release, etc.)

Hope this helps!

like image 148
Mike Kale Avatar answered Sep 21 '22 15:09

Mike Kale