app在真机能运行,在模拟器不能正常编译,出现报错
字面看是模拟器状态下找不到对应的arm64架构文件,实质是M1芯片的兼容性问题
PS:用M1芯片电脑 很多时候会遇到兼容性问题,当常规方案解决不了问题,试着搜索的时候带上关键字M1或许能更快找到答案
网上搜索了很多无非就是需要该配置文件,但是亲测实际只需要2步
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
然后选模拟器编译通过~
此方法适用于搭载M1芯片的Macbook
参考文章如下,感谢
【1】https://blog.csdn.net/ws1836300/article/details/108755295
【2】https://www.jianshu.com/p/5a4d85a8ac35
【3】https://www.jianshu.com/p/0fc2a6402870(这篇文章步骤是相对比较清晰的,但与我最终得到的答案有出入,没能最终解决问题)
【4】https://blog.csdn.net/lvsonghai/article/details/110873689(这篇是解决问题的很关键一点)