LoginSignup
0
0

More than 1 year has passed since last update.

Apple SiliconのMacでCarthageがビルドできない時の対応方法

Posted at

なんの記事

  • M1MaxでXcode13.2.1を使用しCarthageをビルドしたところ、できなかったのでその原因と解決方法をメモする。

# エラー内容

Building universal frameworks with common architectures is not possible. The device and simulator slices for "Apollo" both build for: arm64
Rebuild with --use-xcframeworks to create an xcframework bundle instead.
make: *** [build-carts] Error 1

対応方法

  • Carthageのバージョンを確認し、0.37.0以降であることを確認する。
carthage version
  • Carthageフォルダ内のファイルを削除し、以下のコマンドで、xcframeworksでCarthageをビルドする。
carthage bootstrap --platform iOS --use-xcframeworks 

原因

  • Xcode 12でシュミレーター用にarm64アーキテクチャが追加されるようになり、Carthageでビルドができなくなった。
  • Carthage公式でワークアラウンドが提供されましたが、Apple SiliconのMacでは利用できない制限があった。
  • 0.37.0からXCFrameworkでビルドできるようになった。
  • XCFrameworkでビルドすることでXcode 12でCarthageが使えるようになる。
0
0
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
0
0