在podfile中添加钩子
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
执行 pod install 即可。
参考链接:M1芯片Mac搭建ios开发环境踩坑 - Mirari's Blog ,参考了方案2解决了问题,方案1没有效果。