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

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容