Use Legacy Swift Language Version - Xcode 8.2

Aleš Oskar Kocur picture Aleš Oskar Kocur · Dec 13, 2016 · Viewed 20.7k times · Source

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.

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?

// Edited

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.

// Edit 21.12.

The issue has been fixed in Xcode 8.2.1

Answer

zumzum picture zumzum · Dec 13, 2016

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.

enter image description here