How can I use .xcconfig files in Xcode 4?

2020-01-26 03:56发布

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?

2条回答
你好瞎i
2楼-- · 2020-01-26 04:27

Great answer from Mike Kale. If the description was not clear enough, here is a screenshot.

xcconfig in the project configuration

查看更多
放荡不羁爱自由
3楼-- · 2020-01-26 04:32

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!

查看更多
登录 后发表回答