iOS M1电脑上 Pods 第三方后运行模拟器报错 ‘xx.h’ file not found

在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没有效果。

你可能感兴趣的:(ios,M1,cocoapods)