28

フレームワークの構築に使用される Carthage Swift のバージョンを変更することは可能ですか?

プロジェクトを Swift 3 (Xcode 8 ベータ版) に移行しようとしていますが、サード パーティのライブラリだけがプロジェクトのコンパイルを妨げています。Swift 3 に特定のブランチを使用している間、Carthage は新しい Swift 構文に関するエラーをスローします。

どんな助けでも大歓迎です!

4

2 に答える 2

55

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

于 2016-06-16T20:42:12.660 に答える
0

Carthage の GitHub には、XCode 8 と互換性の問題に関するバグ レポートがあります。リポジトリでその問題のスレッドをフォローすることをお勧めします。

https://github.com/Carthage/Carthage/issues/1440

Carthage のリポジトリで報告された別の関連する問題は、https ://github.com/Carthage/Carthage/issues/1445 です。

于 2016-08-22T18:47:50.557 に答える