excluding NSLog's from release version of iPhone app

Could somebody go over how to exempt NSLog's from a release build of an app? Also, does it matter if comments are left in a release version? Thanks!


Use a macro like DLog to wrap NSLog, and turn it off in Release builds.

#ifdef DEBUG
#    define DLog(...) NSLog(__VA_ARGS__)
#    define DLog(...) /* */

Comments absolutely don't matter. They are only in your source code, not the compiled output. You don't submit your source code to Apple, only the built copy of your app.

Need Your Help

Using aspect.around, but checking for methods calling each other

javascript dojo aspects

I would like to run some specific code around put() and add() for Dojo stores.

Ready made insite search for asp.net website

c# asp.net search e-commerce search-engine

I have developed a business index which combines ecommerce websites.(in asp.net2.0+c#)