Xcode: Setting GCC_PREPROCESSOR_DEFINITIONS for different build configurations?
I want to set
GCC_PREPROCESSOR_DEFINITIONS for each of my four build configurations (Debug, Release, Ad Hoc, and Distribution.) I’d like to have a different setting for each.
The screen I’m looking at is the Target Info window’s “Build” tab. When I set the Configuration pop-up to “Debug” I can see my
GCC_PREPROCESSOR_DEFINITIONS setting there. When I switch to “Release,” or any of the other configurations, it’s no longer visible. Yet when I try to add it to those configurations, it says
GCC_PREPROCESSOR_DEFINITIONS already exists, and that I can’t add it again.
As I said, I want to have a different setting for my various builds. How can I accomplish this?
Thanks very much.
- How do I create a release build in Xcode?
- How to enable build timing in Xcode?
- livereload causes app to stall on splash screen (continuous loading wheel) - Ionic
- Xcode process launch failed: Security
- Xcode stack trace not appearing in console
- Xcode “Build and Archive” button disabled for Mac app. Why?
2 Solutions Collect From Internet About “Xcode: Setting GCC_PREPROCESSOR_DEFINITIONS for different build configurations?”
Make sure there isn’t a setting called “Preprocessor Macros”. This is the same as
OTHER_CFLAGS if I understood the question right. And pass your defines like
-DDEBUG or something.
And yes, if you need to assign a value to a macro, you could do something like this –
Note ‘ symbols around – they are required. SOME_MESSAGE macro will be defined with @”Hello, World!” value.
- iOS 64 bit compatibility
- Integrate Fabric/Crashlytics via CocoaPods
- Cocoa/Obj-C – Open file when dragging it to application icon
- Disable iOS Overscroll but allow body scrolling
- Is the order of SKNode.nodesAtPoint guaranteed?
- Proper way to deal with cell reuse with background threads?
- ContainerView embedded in ViewController: Outlets are nil
- UITextField how to disable the paste?
- Get the current UIScrollView scroll values on the iPhone?
- iPhone programmatically crop a square image to appear as circle
- Class PLBuildVersion is implemented in both/Applications
- How do I create a multiline table cell in iOS?
- Error installing Crashlytics – SSL peer handshake failed
- How to print a string from plist without “Optional”?
- Check for ARC in precompile