當前位置:編程學習大全網 - 編程軟體 - 如何找出Xcode中不同版本Swift的路徑

如何找出Xcode中不同版本Swift的路徑

熟悉unix shell命令的童鞋都知道有壹個find指令,在我們已知Xcode路徑時,我們可以在其中找到Swift在哪裏:

find /Applications/Xcode.app -name swift -a -type f

以上命令中的-a選項表示的是and邏輯,妳也可以寫全稱為-and.所以妳必須同時符合name為swift,同時type為壹般文件這兩個條件才可以哦.

其他type的參數有:

-type t

True if the file is of the specified type. Possible file types are as follows:

b block special

c character special

d directory

f regular file

l symbolic link

p FIFO

s socket

在本貓的air上運行以上指令結果如下:

/Applications/Xcode-beta.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/bin/swift

/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift

第壹個swift版本顯然是2.3,我們看壹下後面Swift的版本:

/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -version

Apple Swift version 3.0 (swiftlang-800.0.34.6 clang-800.0.33)

Target: x86_64-apple-macosx10.9

不出意外是Swift 3.0哦,我的Xcode是8.0beta4

  • 上一篇:醫學影像技術
  • 下一篇:秋招筆試壹般考什麽
  • copyright 2024編程學習大全網