Use Swift 2.2 in Xcode 8? Use Swift 2.2 in Xcode 8? swift swift

Use Swift 2.2 in Xcode 8?


If you want to continue to use Swift 2 in Xcode 8, then use Swift 2.3 by enabling the Use Legacy Swift Language Version build setting (SWIFT_VERSION = 2.3).


Using Swift 2.3 in Xcode 8 by That Thing in Swift provides a good introduction to using Swift 2.3 in Xcode 8.

The following is quoted from the article:

There’s a single build setting that will let you continue building your Swift projects with a Swift version that’s mostly similar in syntax to your existing projects from Xcode 7: Use Legacy Swift Language Version

Just drop into your project’s build settings and search for legacy swift to find the correct build setting, then switch the setting to YES to opt-in to Swift 2.3 rather than Swift 3 in Xcode 8.

enter image description here


It is not possible to use Swift2.2 in XCode8, and it is also not possible to use Swift2.3 or Swift3 in XCode3.

The best solution i found is to create a single project file that will compile for both iOS 9 (Xcode 7) and iOS 10 (Xcode 8), and that will support Swift2.2 and Swift2.3 (very similar).