一、 Linker command failed with exit code 1 (use -v to see invocation)
开发环境:Xcode 14.3
报错信息:
File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a Linker command failed with exit code 1 (use -v to see invocation)
解决方案
PodFile中添加,重新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'] = '13.0'
end
end
end
end
如果还报错,参考stock overflow
二、 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]
开发环境:Xcode 14.3
arichive时报错,信息如下:
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
** ARCHIVE FAILED **
The following build commands failed: PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/davin/Library/Developer/Xcode/DerivedData/aiFriend-fxlyidyegbhohlefkuwesixdmzsy/Build/Intermediates.noindex/ArchiveIntermediates/aiFriend/IntermediateBuildFilesPath/aiFriend.build/Debug-iphoneos/aiFriend.build/Script-D2D7ABCE635BD72190BED51F.sh (in target 'aiFriend' from project 'aiFriend') (1 failure)
解决方案
-
假如电脑上还有Xcode 14.2,则把 Command Line Tools中改为Xcode 14.2编译,如下图:
-
如果使用 Xcode Cloud有问题,可以修改Xcode Version为Xcode 14.2, 如下图:
假如电脑上只有一个最新的Xcode 14.3,比如我。。。那么要如下修改:
找到…-frameworks.sh 文件,替换
source="$(readlink "${source}")"
为
source="$(readlink -f "${source}")"
具体做法是:全局搜要替换的source="$(readlink "${source}")"
,然后再把它替换为正确的source="$(readlink -f "${source}")"
,再次编译即可成功。