swift2.0旧项目升级到3.0项目报错及解决
2017-02-21 本文已影响82人
YannChee
最近把一个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,将该项的所有链接的库移除重新编译即可