2024年旧的iOS项目迁移到m3,升级Xcode15版本,报错的问题Linker command failed with exit code1 (use -v to see invocation)

随笔3个月前发布 十四个六天
39 0 0

如下图:因为这个问题整了半天时间;下面把方法记录一下,也让大家少走一些弯路。

2024年旧的iOS项目迁移到m3,升级Xcode15版本,报错的问题Linker command failed with exit code1 (use -v to see invocation)

解决方法:

第一步,首先在podfile文件末尾添加以下脚本:然后执行pod install 命令。

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

第二步就是 1.打开Build Settings 中 搜索 Build Active Architecture Only,然后设置成yes

2. 下面的 Exclude Architectures 下面加 Any SDK = arm64.

如下图,这样就完美解决了这个问题。也是网上搜的两篇文章凑起来的答案。。。

2024年旧的iOS项目迁移到m3,升级Xcode15版本,报错的问题Linker command failed with exit code1 (use -v to see invocation)

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...