1.在***-Prefix.pch里面添加
#ifndef __OPTIMIZE__ # define NSLog(...) NSLog(__VA_ARGS__) #else # define NSLog(...) {} #endif
或者
#ifdef DEBUG
#define debugLog(…) NSLog(__VA_ARGS__)
#define debugMethod() NSLog(@"%s", __func__)
#else
#define debugLog(…)
#define debugMethod()
#endif
2,进入Xcode ,选择菜单“Product”->"Scheme"->“Manage Schemes”,选择一个项目,点击“Edit”,Bulid Configuration
运行就ok了
3,可是我这样并没有用。问别人也说我的流程没错,他们是好的。
先暂时这样,以后再关注。
4,原因大概知道了:
因为我的是Xcode6,prefix.pch文件是我自己添加的而不是系统自动生成的。
自己添加的需要与系统产生关联。
方法如下:
因为我直接放在Supporting Files下面所以直接这样 然后就真的ok了。
$(SRCROOT)/****-Prefix.pch