LoginSignup
9
10

More than 3 years have passed since last update.

XCode12でビルド先をシミュレーターにするとビルドできない!

Posted at

ビルド先をシミュレーターにするとビルドできない!

XCode12からビルドシステムが変わったみたいで、
building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
エラーが発生し、ビルドできないプロジェクトがあるみたいです。

解決方法

arm64をArchitecturesからはずせばいいらしい。

Build Settings > Architectures > Excluded Architectures > Any iOS Simulator SDK = arm64

CocoaPodsの設定

CocoaPodsのライブラリでエラーが出ている場合は、Podfileに↓を追記する。

Podfile
post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    if config.name == "Develop"
      config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
    end
  end
end
9
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
9
10