最近把Xcode 升级到14.3 发现pod 不是很适配,出现报错
File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
此处提供两种解决方案:
1、同样的代码在Xcode 14.2 中就没有问题,通过去查找,发现barclite_iphoneos.a 在xcode 14.3中并没有,在Xcode 14.2中是有的;“然后把14.2的目录文件arc/整个拷贝到14.3的Xcode应用目录里。”能将项目跑起来,有未知风险(不推荐)
2、在pod 文件里添加下面代码,放在pod 最后一个end前面 ,然后pod install 一下,问题解决(原理:感觉就是Xode版本和pod版本不一致导致,改成一致就可以了)(推荐)
Showing Recent Errors Only
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
end
总结:上面的第一行 可以去掉Showing Recent Errors Only
直接复制:
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
end
就可以
网友评论