在導入alamofire和snapkit的時候,雖然在cocoapods版本符合作者的要求的情況下,導入這兩個三方框架的依然要求將代碼轉換成swift3.0的報錯,如果你一旦轉換了,那么就是999+的報錯,弄了半下午,找到了解決辦法,也就是三方框架的代碼在編譯的時候仍是2.3的語法,需要將起轉換成3.0進行編譯。
報錯
- Xcode 8 will not be able to build the targets “Alamofire” and “SnapKit”, and certain editing features will not function properly until the Swift source code in these targets has been converted.
解決辦法如圖:
解決圖
再次編譯一下,應該可以解決大部分的問題,別再百度上搜了,搜的東西都是一模一樣的,特別是那個CSDN已經淪陷。