0

I've written an application that works flawlessly when I run it directly from xcode with the run button. This builds a debug version of the binary. When I build for archive (a release build) the application won't function. The only difference between the build, that I know of, is a result of my DLog() macro.

#ifdef DEBUG
#    define DLog(...) NSLog(__VA_ARGS__)
#else
#    define DLog(...) do {} while (0)
#endif
#ifdef DEBUGVERBOSE
#    define VLog(...) NSLog(__VA_ARGS__)
#else
#    define VLog(...) do {} while (0)
#endif
#define ALog(...) NSLog(__VA_ARGS__)

I'm at a loss on how to start to debug this issue. Any pointers on where to start?

1
  • 1
    What do you get as error in the log file when running the release build? Also, what happens when you simply put the defines without the ifdefs (so that you get the same thing for both builds)?
    – sch
    Feb 19, 2012 at 2:29

1 Answer 1

0

Try adding #undef DEBUG and #undef DEBUGVERBOSE just before your #ifdefs.

Also, try to remove the set DEBUG=0 and DEBUGVERBOSE=0, compile your project (Debug) and run the app on the simulator.

This way, you can know if the problems comes from this part of your code or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.