0

Is there a way to build for the Production version of an iPad app, so that NSLog won't print anything out, and higher optimization level is used for the compiler, and no debugging information is put into the code, etc?

I tried Product -> Build for -> Archiving and also for Profiling, and chose Product -> Perform Action -> Run without building, but I still see the messages from NSLog and it looks like it is a debug build.

nonopolarity
  • 146,324
  • 131
  • 460
  • 740

1 Answers1

1

You should Edit your Schema for Release,instead of debug. That will do. But The NSLog will work even in release,if you don't switch it of yourself like here Do I need to disable NSLog before release Application?

Community
  • 1
  • 1
Nikita Pestrov
  • 5,876
  • 4
  • 31
  • 66
  • so set "Release" for the "Run" build or for whatever build you would like? But after that still `NSLog` messages were being generated..., and also breakpoint still will stop the code execution... – nonopolarity Apr 22 '12 at 09:45
  • 1
    The NSLog will work even in release,if you don't switch it of yourself like here http://stackoverflow.com/questions/2025471/do-i-need-to-disable-nslog-before-release-application – Nikita Pestrov Apr 22 '12 at 09:51
  • thanks. funny NSLog has no mechanism to be turned off from the build type itself (we need to implement it) – nonopolarity Apr 22 '12 at 17:40