domenica 24 maggio 2015

Disable log when you release an iOS version

NSLog is very useful during the development phase but it's not secure to have it enabled when you want to release your application on iTunes.
A quick solution, avoiding to change each class of your project, is the following (thanks again to Stackoverflow)
Put this 3 lines at the end of your application -prefix.pch file:
#ifndef DEBUG
  #define NSLog(...) /* suppress NSLog when in release mode */
#endif
You don't need to define anything into your project, because DEBUG is defined in your build setting by default when you create your project.

Nessun commento:

Posta un commento