• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Configurations and Defines
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Configurations and Defines


  • Subject: Re: Configurations and Defines
  • From: Adam Knight <email@hidden>
  • Date: Sun, 14 Aug 2005 10:30:10 -0500

All I do is make a new build configuration and set "Preprocessor Macros" to include said keywords. For instance, my "Debug" configuration has "DEBUG" as a macro, so in code I can do something like:

#if DEBUG
    NSLog(@"I should not be seen here: %@", self);
#endif

You could easily do the same for a demo build or whatnot, if you wanted to leave something like saving out entirely.

My only recommendation against it is that you are literally building different binaries with each config and, if not careful, can introduce build-specific bugs. So for your demo I'd have two new configs: Demo and Demo Debug (with the appropriate macros listed).

Otherwise, this method has served me well for years. :)

On Aug 14, 2005, at 9:16 AM, Jeremy Sagan wrote:

Is there a way, besides using a different prefix header, to add defines to particular configurations in XCode. For example I would like to do a sequence of defines such as:

#define Debugging 1
#define Demo 0

if the configuration is Debug and if the configuration is release

#define Debugging 0
#define Demo 0

and if the configuration is a demo:

#define Debugging 0
#define Demo 1

Thanks,
Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40pobox.com


This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Configurations and Defines (From: Jeremy Sagan <email@hidden>)

  • Prev by Date: Configurations and Defines
  • Next by Date: Auto-Versioning with Xcode & Subversion
  • Previous by thread: Configurations and Defines
  • Next by thread: Auto-Versioning with Xcode & Subversion
  • Index(es):
    • Date
    • Thread