安装Xcode 7之后,Xcode 6.3显示有关转换为Swift 2的错误 [英] After installing Xcode 7, Xcode 6.3 shows errors about converting to Swift 2

查看:77
本文介绍了安装Xcode 7之后,Xcode 6.3显示有关转换为Swift 2的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装Xcode 7与Playgrounds中的Swift 2一起玩后,我遇到了一个奇怪的问题:

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

当我使用Xcode 6.3打开现有的Xcode 6.3项目时,它会引发许多与Swift 2转换有关的错误.

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

该项目只是从存储库中克隆的,尚未使用Xcode 7打开.

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

所以我的猜测是Xcode 7安装弄乱了Xcode 6.3安装的工具或类似的东西,但是我不知道如何开始修复它.

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.

我现在当然不想在Xcode 7中打开和升级这个大项目,但是我确实需要在Xcode 6.3和Swift 1.2中打开它才能继续进行工作.

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.

推荐答案

感谢Leo的评论,我得以

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

但是,即使在清理所有内容并重新启动后,Xcode仍拒绝构建项目的包含框架(SQLite.swift和SwiftHTTP).

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

我必须手动卸载它们,清除它们出现的构建阶段"和目标"字段,然后使用CocoaPods重新安装它们.

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

之后,我的应用程序再次在Xcode 6.3中正确编译.

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

这篇关于安装Xcode 7之后,Xcode 6.3显示有关转换为Swift 2的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆