赞
踩
Xcode 升级 14.3 之后,在Xcode 运行项目会收到以下错误
File not found: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
项目中可以通过以下方法解决编译错误,就是在 Podfile 中,设置IPHONEOS_DEPLOYMENT_TARGET
,代码如下:
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'] = '12.0'
end
end
end
end
但是因为项目中有一些私有组件,也引用了一些minimum deployment设置比较低的三方库,会导致我们提交私有组件时,也报如下错误
/App-exxigwycpikvlpgzpmccfjpmuvkx/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/YYCategories.build/Objects-normal/x86_64/Binary/YYCategories
ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/mengruirui/Library/Developer/Xcode/DerivedData/App-exxigwycpikvlpgzpmccfjpmuvkx/Build/Intermediates.noindex/Pods.build/Release-iphonesimulator/YYCategories.build/Objects-normal/x86_64/Binary/YYCategories normal x86_64 (in target 'YYCategories' from project 'Pods')
(1 failure)
将第三方组件克隆一份放到本地私有仓,修改 minimum deployment
,然后依赖我们自己的私有组件
libarclite_iphonesimulator.a
文件至本地文件目录Finder
应用程序,在菜单中找到前往
-> 前往文件夹
输入以下地址,然后前往/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
arc
文件夹,如果没有该文件夹,则新建文件夹,命名为arc
libarclite_iphonesimulator.a
文件,拷贝到arc
文件夹下面Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。