swift2.0旧项目升级到3.0项目报错及解决

最近把一个swift2.0的旧项目用Xcode8.0打开升级到swift3.0项目碰到了俩个报错

1. 升级第三方库,终端执行pod update 或 pod install时,报错为:

[!] The MyAppName [Debug] target overrides the OTHER_SWIFT_FLAGS build setting defined in `Pods/Target Support Files/Pods-TestApp/Pods-TestApp.release.xcconfig'. This can lead to problems with the CocoaPods installation

-Use the $(inherited) flag, or
-Remove the build settings from the target.

** 解决方法: 进入项目的 BuildSettings 面板,搜索 Other Swift Flags ,将 值用 $(inherited) 替换, 再执行 pod update 或 pod install 就可以了**

Paste_Image.png

2.修改完swift2.0到3.0过渡的所有语法错误后,在编译链接时报错为

ld: framework not found Pods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如图所示

翻墙查阅资料得到办法是:
进入项目管理的 Targets > General > Linked Frameworks and Libraries,将该项的所有链接的库移除重新编译即可

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容