是否可以更改用於構建框架的Carthage Swift版本?更改Carthage Swift版本
我想將我的項目遷移到Swift 3(在Xcode 8測試版上),並且第三方庫是阻止我的項目編譯的唯一東西。 在使用swift 3的特定分支時,Carthage會拋出有關新Swift語法的錯誤。
任何幫助將不勝感激!
是否可以更改用於構建框架的Carthage Swift版本?更改Carthage Swift版本
我想將我的項目遷移到Swift 3(在Xcode 8測試版上),並且第三方庫是阻止我的項目編譯的唯一東西。 在使用swift 3的特定分支時,Carthage會拋出有關新Swift語法的錯誤。
任何幫助將不勝感激!
迦太基使用命令行工具xcodebuild
來構建框架。的Xcode通過在命令行系統中使用的版本是由工具xcode-select
Usage: xcode-select [options]
Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example,
xcodebuild) as well as the BSD development commands (such as cc and make).
Options:
-h, --help print this help message and exit
-p, --print-path print the path of the active developer directory
-s <path>, --switch <path> set the path for the active developer directory
--install open a dialog for installation of the command line developer tools
-v, --version print the xcode-select version
-r, --reset reset to the default command line tools path
它需要指向開發者SDK目錄中選擇的值決定的,所以你可以使用--print-path
以檢查它目前指向。
xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
然後去改變它只是運行sudo xcode-select --switch <path-to-beta-xcode>/Contents/Developer
有大約8的XCode和破碎的兼容性迦太基的GitHub上的bug報告。您可能需要遵循這一問題的線程上的回購:
https://github.com/Carthage/Carthage/issues/1440
在迦太基的回購另一個相關報告的問題是:https://github.com/Carthage/Carthage/issues/1445
您還可以更改此使用的Xcode>首選項>位置,然後在「命令行工具」 –