Alex Rivera | Logout

How to define a preprocessor symbol in Xcode

Asked 2008-12-15T02:52:04.317
109

Is it possible to set a symbol for conditional compilation by setting up properties in an Xcode project?

My aim is to to create a symbol that is available to all files, without having to use import/include, so that a set of common classes can have a special behavior in some projects. Like the following, but with my own symbols.

#if TARGET_IPHONE_SIMULATOR
    ...
#endif
Edit
Report

1 Answer

0

You can duplicate the target which has the preprocessing section, rename it to any name you want, and then change your Preprocessor macro value.

answered 2010-09-08T03:49:42.947

Your Answer