9
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Xcode6とXcode7が共存する環境でCarthageのビルドがエラーになる

9
Posted at

インストール環境

Xcode6.4が入っているMacに、Xcode7.3を(遅ればせながら)インストールしました。
dmg版のXcode7.3をインストールすることで、Xcode6.4の環境を上書きせず残しました。
(参考)
http://egg-is-world.com/2015/04/10/xcode-version-install/

Carthageでのビルドエラー

Xcode7.3にCarthageでライブラリを組み込もうとして、
$ carthage update --platform iOS
コマンドを実行したところ、
CompileSwift normal x86_64 ...
というエラーが吐き出され、ライブラリのビルドができませんでした。

回避方法

以下のコマンドを実行したところ、無事に回避できました。
$ sudo xcode-select -switch /Applications/Xcode-7.3.app/Contents/Developer
※"Xcode-7.3.app"の部分は、PC上のアプリケーション名に変更する必要があります。

Swiftのバージョンが異なるXcodeを複数インストールしている環境でCarthageを使う際は、
xcodebuildが適用するSwiftのバージョンを切り替えてあげる必要があるようです。

(参考)
http://qiita.com/masahiko24/items/8b42e2679608bf785454

9
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?