今天看啥  ›  专栏  ›  微微笑的蜗牛

XCode7去除警告

微微笑的蜗牛  · 掘金  ·  · 2021-03-22 20:19
阅读 3

XCode7去除警告

在旧工程用 XCode7 打开后,会出现很多警告。类似于. pcm:no such file for requested architechture。

解决方法是,将 Debug Information Format 的 Debug 改成 DWARF,瞬间世界清净了。

在 XCode7 中新建工程,默认就是 DWARF。

另附上解决 xcode 其他警告的方法:

1、directory not found for option -L..path

在 Build Settings---》Framework Search Path,Library Search Path 中删除找不到的路径即可。

2、unexpected file type 'wrapper.plug-in' in frameworks & libraries build phase

在 General->Linked Frameworks and Libraries 中,是因为在 framework and library 中添加了其他不是 lib 的文件,如 bundle,删除即可。

3、no rule to process file。。。

在 compile source 里删掉多余的文件.

4、undeclared selector 警告

#pragma clang diagnostic push

#pragma clang diagnostic ignored"-Wundeclared-selector"

nativeTwitterAccountPresent =

#pragma clang diagnostic pop

5、Category is implementing a method which will also be implemented by its primary class

当 category 重写类已有的方法时会出现此警告。

#pragma clang diagnostic push

#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation”

#pragma clang diagnostic pop




原文地址:访问原文地址
快照地址: 访问文章快照