最近把一個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,將該項的所有鏈接的庫移除重新編譯即可