由于手機升級了iOS 16.4伶氢,想要真機調(diào)試趟径,Xcode 也要升級到 14.3, 于是就升級了一下癣防,結(jié)果各種報錯蜗巧。
Run、Build報錯
File not found: /Users/johnson/Downloads/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
由于 Xcode 14開始蕾盯,增加了最低版本支持 Minimum Deployments 11.0
根據(jù)報錯內(nèi)容幕屹,所有的pod庫也會有相應(yīng)的最低版本支持問題。
解決方案:在podfile文件中级遭,增加以下內(nèi)容望拖,重新pod install一下
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
至此Run、Build沒有問題了挫鸽,但是打包卻發(fā)現(xiàn)又報錯了... ...
Archive報錯
building file list ... rsync: link_stat "/Users/xxx/.../AFNetworking.framework" failed: No such file or directory (2)
done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/9e200cfa-7d96-11ed-886f-a23c4f261b56/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996) [sender=2.6.9]
Command PhaseScriptExecution failed with a nonzero exit code
解決方案:
全局搜索
source="$(readlink "${source}")"
替換成下面
source="$(readlink -f "${source}")"
文章引自:
https://cloud.tencent.com/developer/article/2255102
http://www.reibang.com/p/fb1178645292