How to set Swift version 5 (for recent dev snapshots) in Xcode build settings?

Here is a hack that works for trying out the snapshots in Swift 5 mode:

  1. Edit the file /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/XCLanguageSupport.xcplugin/Contents/Resources/Swift.xcspec

  2. Search for SupportedLanguageVersions and add 5.0 as a valid value.

11 Likes