Swift 3 requires Sierra

Having no interest whatsoever in moving to Sierra I was startled to discover that Swift 3 requires Sierra. Worse, Apple has hidden the Swift 2.3 documentation — if it even still exists — so well that after a couple of hours searching and surfing I couldn’t find any trace of it. Except: The documentation in Xcode 8.2 on El Capitan seems to still be Swift 2.3, because Foundation classes begin with “NS”, which is no longer true in Swift 3. (How‘s that for backward compatibility! Though they do provide a migration tool.) I haven’t studied the Xcode 8.2 Swift documentation well enough to understand which version it is really documenting, though.

Playgrounds are affected to: “Playgrounds in Xcode [8] only work with Swift 3,” Swift 3 and Xcode 8 - Apple Developer

If anyone knows where to find Swift 2.3 documentation outside of Xcode, I would desperately like to know that.

You can’t compile and test with Swift 3 from Xcode 8 under El Capitan ?

‘Xcode 8.2.1 requires a Mac running macOS 10.11.5 or later’


It seems a pity to write code now for 2.3 … it won’t have much longevity or support …

If I remember correctly I didn’t have any issues with Swift 3 on El Capitan. Also playgrounds worked fine.

I didn’t try it, I was just going by the Apple information as quoted above regarding playgrounds, and somewhere I thought I saw that Swift 3 wasn’t supported on El Capitan / Xcode 8.2. I can’t find anything that says the latter, so I guess I misread something I can no longer find. But the former is supported by the quote from Apple I provided in the OP. And I still don’t know how to find Swift 2.3 documentation online – not even the whole Swift book they have.

Just tested it on my MacBook Air which is still running El Capitan (10.11.6), and Swift 3 code runs fine there (Xcode 8 playground), while Swift 2 code doesn’t run.

As @ComplexPoint has said, it would be a pity to start a new project in Swift 2.x

That‘s weird — Xcode 8.2 is supposed to support Swift 2.3 on El Capitan.

Apparently you can switch the compiler (for a project) to “legacy swift” mode, which is 2.3 in Xcode 8. But I don’t know if this can be done also for Playgrounds.


But before using legacy swift mode it’s probably a better idea to take the time and update the code to 3.0 (unless you have a huge project). Xcode is providing very helpful hints for that (it’s basically a semi-automatic conversion to 3.0).