Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add preprocessor macro to a target in xcode 6

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

like image 724
user1051307 Avatar asked Nov 14 '14 11:11

user1051307


2 Answers

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.
like image 64
JoeFryer Avatar answered Oct 05 '22 18:10

JoeFryer


In Xcode 9 you have to add a preprocessor macros to Project, not Target. Also don't forget to add "D" as the firs letter. For example, "DDebug", then it works.

like image 20
Irina Avatar answered Oct 05 '22 20:10

Irina