Do not use NSLog in Release configuration

by alex 11. May 2009 11:59

//You need o put this code into *_Prefix.pch

#ifdef DEBUG

#define DLog(...) NSLog(__VA_ARGS__)

#else

#define DLog(...) /* */

#endif

#define ALog(...) NSLog(__VA_ARGS__)

 

//In build options you need to add -DDEBUG to the Other C Flags for "Debug" configuration

//Note -- this options appears only for Device *.* configuration

//Last step -- replace NSLog with DLog enywhere you want to hide NSLog output on release build

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

General

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen