フレームワークの構築に使用される Carthage Swift のバージョンを変更することは可能ですか?
プロジェクトを Swift 3 (Xcode 8 ベータ版) に移行しようとしていますが、サード パーティのライブラリだけがプロジェクトのコンパイルを妨げています。Swift 3 に特定のブランチを使用している間、Carthage は新しい Swift 構文に関するエラーをスローします。
どんな助けでも大歓迎です!
Carthage は、コマンド ライン ツールを使用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
Developer SDK ディレクトリを指す必要があるため、--print-path
現在どこを指しているかを確認するために使用できます。
xcode-select --print-path
/Applications/Xcode.app/Contents/Developer
次に、それを変更するには、実行するだけですsudo xcode-select --switch <path-to-beta-xcode>/Contents/Developer
Carthage の GitHub には、XCode 8 と互換性の問題に関するバグ レポートがあります。リポジトリでその問題のスレッドをフォローすることをお勧めします。
https://github.com/Carthage/Carthage/issues/1440
Carthage のリポジトリで報告された別の関連する問題は、https ://github.com/Carthage/Carthage/issues/1445 です。