search

Home  >  Q&A  >  body text

ios - 没有预编译文件prefix.pch的情况下怎么在发布版中去除NSLog?

在网上搜了一下,都是说在prefix.pch文件里加上这么一段

#ifndef __OPTIMIZE__   
#define NSLog(...) NSLog(__VA_ARGS__)   
#else   
#define NSLog(...) {}   
#endif  

我现在的项目都不用prefix.pch了,有没有其他的办法?

天蓬老师天蓬老师2811 days ago654

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 16:14:11

    If you want to disable NSLog output in the release version, you must replace NSLog globally. How can you replace NSLog globally without pch...

    reply
    0
  • 迷茫

    迷茫2017-04-17 16:14:11

    Just because you don’t use it doesn’t mean you can’t use it, create a new one yourself

    reply
    0
  • Cancelreply