What versions of Swift are supported by what versions of Xcode?

Ben Leggiero picture Ben Leggiero · Jul 17, 2018 · Viewed 19.5k times · Source

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.

A complex table with many versions of Swift and Xcode as the axes, and the support versions as the content

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.

Answer

Ben Leggiero picture Ben Leggiero · Oct 15, 2018

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

A chart depicting the different versions of Swift as compared to their respective versions of Xcode. Last updated 2020-02-25

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