Use Legacy Swift Language Version - Xcode 8.2

Fixed in Xcode 8.2.1.

Here is a copy of the integrality of the changelog of Xcode 8.2.1:

Swift

Resolved Issues

  • Fixed an issue that could cause building a project to fail with the error message “"Use Legacy Swift Language Version" (SWIFT_VERSION) is required to be configured correctly for targets which use Swift” when using a supported version of Swift. (29667880)
  • Xcode no longer warns about using deprecated Swift 2.3 code when the active scheme does not reference targets using Swift 2.3 code. (29671741)

I got the same error. I tried for searching "Use Legacy Swift Language Version", but not found. I am using Xcode 8.3.3 After surfing too much and working around i found this solution, and this worked for me.

Follow these steps.
1=> select your target from Xcode
2=> go to build setting
3=> search for "Swift Language Version"
4=> change it to swift 3. (or accordingly.)

Hope this work for you.


Close Xcode and open the corresponding project.pbxproj in a text editor of your choice.

Replace SWIFT_VERSION = 3.0.1; with SWIFT_VERSION = 3.0; for all targets.

Reopen Xcode.


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