一个有节操的程序员会在乎自己的代码的警告,就像在乎饭碗边上有只死蟑螂那样。 ——@onevcat
偷得浮生半日闲,今天终于有时间处理一下项目中的警告
1、warning :no rule to process file xxx
在build phases->compile sources 里面将对应的文件移除即可。
2、Multiple build commands for output file xxx
工程中包含多个相同命名的文件(一般为README.txt)
3、Method definition for xxx not found
在头文件中声明了该方法,但源文件中未实现。
4、 Sending xxx to parameter of incompatible type xxx
未遵循该协议
5、Incompatible pointer types sending xxx to parameter of type xxx
类型不匹配
6、Method possibly missing a [super xxx] call
需要调用父类的该方法
7、xxx:' is deprecated: first deprecated in iOS 8.0
接口在iOS 8.0之后废弃
8、ld: warning: directory not found for option 'xxx'
在build setting->Library search paths里删除该项;或者在build setting->Framework Search Paths里删除该项
9、ld: warning: instance method 'xxx' in category from xxx conflicts with same method from another category
有两个category实现了此方法。
10、The image set name "xxx" is used by multiple image sets.
使用了同名的图片资源。
11、Format specifies type ''xxx (aka 'xxx') but the argument has type '' xxx(aka xxx'')
打印的时候数据类型不一致,一般是打印NSInteger的时候使用了%d