iphone - iOS: optional code fragments for debug builds -
for app i'd have debug view want have in debug-builds , not in release builds. don't want change code though. thats why wondering if can check compiler flag if release build , exclude code want have debug builds.
in projects build settings, preprocessor defines section, in there can define variable in debug build only, such debug=1
, , use in code:
#if debug nslog(@"this print in debug!"); #endif
just make sure in release configuration, same define set 0 in same location in build settings
Comments
Post a Comment