Add preprocessor macro to a target in xcode 6

user1051307 picture user1051307 · Nov 14, 2014 · Viewed 63.5k times · Source

Probably this is pretty simple, but I can't find a way to define a preprocessor macro for a target in Xcode 6.

Answer

JoeFryer picture JoeFryer · Nov 14, 2014

I've done a screenshot to show where it is in Xcode, because it's easier :)

enter image description here

  1. Select project file
  2. Select the target you want
  3. Go to Build Settings
  4. Search for 'preprocessor'
  5. Add your preprocessor macro either for Debug, Release, or both.