Obiwahn
Obiwahn

Reputation: 3087

Common preprocessor macros for all configurations of a target in XCode iPhone Project

I usually have four configurations per target (Debug, Release, Distribution, Ad Hoc) for my Apps.

Is there a way to add a common macro for all 4 of them, while not destroying the macros that I have set so far (you see "multiple values" in the editor).

Thanks in advance, Obiwahn

Upvotes: 3

Views: 1338

Answers (3)

Richard
Richard

Reputation: 3386

You could have all of your targets use the same .xcconfig file; see apple documentation under the heading "Build Configuration Files". Note that even though the screenshots are out of date, the material seems to be accurate.

Upvotes: 0

ThomasW
ThomasW

Reputation: 17317

Another way do do this, which might work better for certain cases, is to use the $(inherited) macro to include the settings from the parent context. This works well with the way Xcode 4 lets you see the settings cascade.

Upvotes: 0

Felix
Felix

Reputation: 35394

Define the macro in the prefix header file (will be included in all source files).

Upvotes: 3

Related Questions