How can I programmatically find Swift's version?

前端 未结 6 1488
轻奢々
轻奢々 2020-12-01 10:16

I know I can find the version of Swift I\'m running right now reverting to a Terminal and typing:

xcrun swift --version
Swift version 1.1 (swift-600.0.57.4)
         


        
6条回答
  •  渐次进展
    2020-12-01 10:41

    Open up a command line on your Mac computer

    type swift -version, without the double dashes, which doesn't work any more for Xcode 11/Swift 5.2.2

    Of course, you'll have to update to latest IDE, which always downloads the latest version of both Xcode, languages, compilers and tools... EVERYTHING is updated. If you do that, that solution works for sure.

提交回复
热议问题