building for iOS Simulator, but

2020-10-27  本文已影响0人  Mrfengzi
  1. Xcode12把valid Architecture去掉了
    需要在user-Defined的EXLUDED_ARCHS的dug下加上Any iOS Simulator SDK值是arm64
  2. 如果项目使用了cocoapods需要在项目的Podfile里面添加代码段,然后执行pod install
post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
  end
end

pod install之前记得先把Podfile.lock文件删掉。

也可以在项目的Podspec文件里面添加

s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }

由于我自己项目以前没有创建Podspec文件,就直接在Podfile里面修改了

上一篇下一篇

猜你喜欢

热点阅读