After installing Xcode 7, Xcode 6.3 shows errors about converting to Swift 2

时光总嘲笑我的痴心妄想 提交于 2019-12-10 18:52:54

问题


After installing Xcode 7 to play with Swift 2 in Playgrounds, I've got a weird problem:

when I open an existing Xcode 6.3 project with Xcode 6.3, it throws lots of errors about conversions to Swift 2.

This project was just cloned from the repository and hasn't been opened with Xcode 7 yet.

So my guess is that the Xcode 7 install messed up the Xcode 6.3 installed tools or something like that, but I have no idea how I could start to fix this.

I certainly don't want to open and upgrade this big project in Xcode 7 at the moment, but I do need to open it in Xcode 6.3 and Swift 1.2 to continue work on it.


回答1:


Thanks to Leo's comment, I was able to clean the caches and derived data, and these errors went away.

But then Xcode refused to build the project's included frameworks (SQLite.swift and SwiftHTTP) even after cleaning everything and rebooting.

I had to uninstall them manually, clear the "build phase" and "target" fields where they appeared, then use CocoaPods to reinstall them.

After that, my app compiled again properly in Xcode 6.3.




回答2:


  1. Click on product in menubar
  2. Click Clean
  3. Then try reBuild project by click on play botton

it works for me



来源:https://stackoverflow.com/questions/30752203/after-installing-xcode-7-xcode-6-3-shows-errors-about-converting-to-swift-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!