building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

今天不知道什么情况,我的xcode 12.5也报错了,之前几天都没事,今天就突然无法编译通过,查了一下资料,说是arm64导致的,我的最终解决报错的方法是结合两篇文章的,在此结合说明。
https://blog.csdn.net/guoyongming925/article/details/114628455
这里结束后,我仍然报错,但是报的错误都是和cocoapod有关系,我感觉可能和另一个步骤有关
https://www.jianshu.com/p/d521d5051bf2 就是这篇文章的最后一步

如果项目使用了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

然后就可以编译通过了

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容