LoginSignup
5
4

More than 3 years have passed since last update.

XcodegenでExcluded Architectureにarm64を設定する

Posted at

Xcodegenを使用したプロジェクトで、arm64アーキテクチャでビルドしようとしたら以下のようなエラーになった。

The linked framework 'Pods_[アプリ名].framework' is missing one or more architectures required by this target: arm64.

調べてみたところ、Build Settings > Architectures > Excluded Architectureで、Any iOS Simulator SDKを選び、arm64を追加すれば直るとのこと。しかし、Xcodegenを使ってプロジェクトファイルを生成していたので、project.ymlでの書き方がわからず少しハマった。

以下のように、ターゲットのsettingsに対して、EXCLUDED_ARCHS[sdk=iphonesimulator*]: arm64としたら、うまく生成できたのでそのメモ。

project.yml
targets:
  YourApp:
    type: application
    platform: iOS
    sources:
      - path: YourApp
    settings:
      base:
        EXCLUDED_ARCHS[sdk=iphonesimulator*]: arm64

参考

https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-object-file-built-for-ios
https://medium.com/@khushwanttanwar/xcode-12-compilation-errors-while-running-with-ios-14-simulators-5731c91326e9

5
4
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
5
4