使用Legacy Swift语言版本 - Xcode 8.2 [英] Use Legacy Swift Language Version - Xcode 8.2

查看:132
本文介绍了使用Legacy Swift语言版本 - Xcode 8.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新到Xcode 8.2后,编译器会为我的App目标抛出一个错误:

After updating to Xcode 8.2 the compiler throws one error for my App target:

"Use Legacy Swift Language Version" (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

但是将它设置为我有目标。试图删除派生数据,清理项目目录,重新启动Xcode。什么都没有帮助。有人弄清楚了吗?

But have it set to No in all targets I have. Tried to remove Derived Data, clean project dir, restart Xcode. Nothing helps. Anyone figure it out?

//编辑

为了确定:我设置了所有我的目标使用Legacy Swift语言版本,在Xcode 8.1中编译时项目工作正常。更新到Xcode 8.2后它无效。

Just to be sure: I have set to ALL my targets Use Legacy Swift Language Version to No and the project worked alright when compiled in Xcode 8.1. It doesn't work after updating to Xcode 8.2.

//编辑21.12。

// Edit 21.12.

问题一直存在修复了Xcode 8.2.1

The issue has been fixed in Xcode 8.2.1

推荐答案

找到解决方法。我在项目中浏览了每个目标(和项目设置,所以在项目和目标中),切换使用Legacy Swift语言版本从并返回。然后该项目再次建成。

Found work around. I went through each target (and project settings, so both in the project and target) in my project, toggled the "Use Legacy Swift Language Version" from "No" to "Yes" and back to "No" for each. The project then built again.

这篇关于使用Legacy Swift语言版本 - Xcode 8.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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