LoginSignup
16
10

More than 3 years have passed since last update.

xcode12(iOS14SDK)でビルドした際に missing one or more architectures required by this target: arm64 で error になる場合

Last updated at Posted at 2020-10-21

Xcode12 iOS14SDK環境で、xcodebuildなどしたときに下記エラーが出たら

error: The linked framework 'Pods_XXXXXXX.framework' is missing one or more architectures required by this target: arm64. (in target 'XxxxxxExtension' from project 'XXXXXX')

iOSシミュレータ で必要ないarm64用バイナリがビルドされてしまっている可能性が高いです。

Xcode12から Valid Architectures(VALID_ARCHS) が不要になったようなので、まず Build Settings にこの項目があったら消します

次に Excluded Architectures に以下のように追加します

これでarm64でのバイナリビルドが除外されます

image.png

cocoapods を使っている場合

Podfile に下記を追加して、 pod install すれば Excluded Architecturesが設定されます

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end
end

参考

stackoverflowで詳しく説明されてる方がおりました

16
10
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
16
10