什么版本的 Xcode 支持什么版本的 Swift? [英] What versions of Swift are supported by what versions of Xcode?

查看:87
本文介绍了什么版本的 Xcode 支持什么版本的 Swift?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以 Swift 开发应用为生.我喜欢这门语言,并尽可能密切地遵循它.然而,某些事实仍然存在,无论是因为我被蒙蔽了双眼,还是因为 Apple 对它们非常沉默.

今天,我发现 Swift 3.3 和 3.4 存在.我假设 3.2 是 3 的最后一个版本,用于迁移到 4、4.2 和 5.这种误解主要是由于

紫色空间中有什么?专门针对 3.3 和 3.4 行,但如果您知道其他行,那也会有所帮助!

权威来源也很棒.

<小时>

主要问题的可能答案如下:

  1. Swift 3.3 仅在 Xcode 9.3 beta 中,从未公开;Swift 3.4 仅适用于 Xcode 9.3 - 9.4
  2. Swift 3.3 仅在 Xcode 9.3 中受支持;Xcode 9.3.1 和 9.4 支持 Swift 3.4
  3. Xcode 9.3 和 9.3.1 支持 Swift 3.3;Swift 3.4 仅在 Xcode 9.4 中受支持
  4. Xcode 9.3 至 9.4 版本支持 Swift 3.3;Swift 3.4 仅在 Xcode 10 测试版中受支持.

我不认为还有另一种可能性.不过,如果我不在基地,请告诉我.

解决方案

由于我一直在收集数据并进行测试,因此我将在此答案中以更新的图表形式发布我的结果:

nofvs3ejK6s">nofvs3ejK6s"img src="https://i.stack.imgur.com/FfPvK.jpg" alt="一张图表,描绘了不同版本的 Swift 与其各自版本的 Xcode.上次更新时间为 2020-02-25"/>

不久前,我发现新版本的 Xcode 实际上不支持从 所有 旧版本的 Swift 迁移.我确实明确测试过 Xcodes 10.2 到 11 不支持 Swift 3.x 及更早版本,所以我将它们涂成白色.我还没有时间测试 Xcode 8.3 到 10.1,但我怀疑他们会迁移 3.x 而不是 2.x 或更早版本;这就是为什么会有一个很大的未知"阻止在顶部.


来源

I develop apps in Swift for a living. I enjoy the language and follow it as closely as I can. Yet, still, certain facts slip through, whether by me being blindsided, or by Apple being very quiet about them.

Today, I discovered that Swift 3.3 and 3.4 exist. I was under the assumption that 3.2 was the last version of 3, for use in migrating to 4, 4.2, and 5. This misconception is mostly due to the fact that Swift.org, the official Git repo, and Xcode Release Notes don't mention them at all.

So, I assume these are also transitional, but I've no idea what IDE or compiler they appear in, or what caveats they come with. Below is a table which sums up my knowledge:

The below table is outdated, provided for context so the question makes sense. I've posted an updated version of this table in an answer below.

What goes in the purple spaces? Specifically for the 3.3 and 3.4 rows, but if you know the other ones, that would help too!

Authoritative sources would also be awesome.


Possible answers to the primary question are as follows:

  1. Swift 3.3 was only in Xcode 9.3 beta and never became public; Swift 3.4 was only in Xcode 9.3 - 9.4
  2. Swift 3.3 was only supported in Xcode 9.3; Swift 3.4 was supported in Xcode 9.3.1 and 9.4
  3. Swift 3.3 was supported in Xcode 9.3 and 9.3.1; Swift 3.4 was only supported in Xcode 9.4
  4. Swift 3.3 was supported in Xcode versions 9.3 though 9.4; Swift 3.4 was only supported in an Xcode 10 beta.

I don't think there's another possibility. Do let me know if I'm off-base, though.

解决方案

Since I've been gathering data and doing tests, I'll post my results as an updated chart in this answer:

Awhile ago, I found out that newer versions of Xcode do not, in fact, support migrating from all older versions of Swift. I did explicitly test that Xcodes 10.2 through 11 don't support Swift 3.x and earlier, so I colored those white. I've not yet had time to test Xcode 8.3 through 10.1, but I suspect they will migrate 3.x but not 2.x or earlier; that's why there's a big "Unknown" block at the top.


Sources

这篇关于什么版本的 Xcode 支持什么版本的 Swift?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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