

Manually check the project-specific Swift version on Xcode’s build settings.Today you learned how to find out the Swift version on Xcode and on your system. To check any Xcode app’s Swift version, run the following command in the terminal: /Applications//Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -versionīy replacing with the name of the Xcode app in your Applications folder.įor example, if your Xcode application is called Xcode_12.5.app, run: /Applications/Xcode_12.5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -version Conclusion You can also use Terminal to check the Swift version of the Xcode app. Check the Swift Version of an Xcode App with the Terminal Usually, this is also the version of Swift that your Xcode application uses. In case you are interested in knowing the Swift installed on your system, you can run the following command in a Terminal window: swift -versionĮxample output: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) In other words, it is possible to have a different Swift version on your system than the one used by Xcode.

You can have Swift installed on your computer without having Xcode. #if swift(>=5.5)Īs a result, this prints the Swift version used by the project. To programmatically find out the Swift version of your project, check if the current version matches with one of the versions there has ever been. How to Check the Swift Version Programmatically These are all the other supported Swift versions available for this project.

If you click the Swift version you are going to see other Swift versions in a dropdown. See the Swift version used by this project.Search for “Swift language version” using the search bar.To check the Swift version of your current Xcode project:
