swift Xcode 14:Rsync“failed:No such file or directory(2)”存档错误

pcrecxhr  于 2023-04-04  发布在  Swift
关注(0)|答案(4)|浏览(1063)

我试图在Xcode 14.3中归档我的项目,并且在“Embed Pods Framework”阶段收到一个构建错误。

rsync: [sender] change_dir "/Users/benjaminhill/src/stagey_producer/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos" failed: No such file or directory (2)

我试过删除我的podfile.lock,清理我的build文件夹,升级rsync,重新启动xcode。在Xcode 13中运行良好,在Xcode 14中项目构建良好-只是在存档时遇到问题。
以下是完整的日志:

PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/benjaminhill/Library/Developer/Xcode/DerivedData/stagey_producer-dzqglqxhgmgoreferuvikcueqhdz/Build/Intermediates.noindex/ArchiveIntermediates/stagey_producer/IntermediateBuildFilesPath/stagey_producer.build/Release-iphoneos/stagey_producer.build/Script-89C3F347056509769E64FEDC.sh (in target 'stagey_producer' from project 'stagey_producer')
    cd /Users/benjaminhill/src/stagey_producer
    /bin/sh -c /Users/benjaminhill/Library/Developer/Xcode/DerivedData/stagey_producer-dzqglqxhgmgoreferuvikcueqhdz/Build/Intermediates.noindex/ArchiveIntermediates/stagey_producer/IntermediateBuildFilesPath/stagey_producer.build/Release-iphoneos/stagey_producer.build/Script-89C3F347056509769E64FEDC.sh

mkdir -p /Users/benjaminhill/Library/Developer/Xcode/DerivedData/stagey_producer-dzqglqxhgmgoreferuvikcueqhdz/Build/Intermediates.noindex/ArchiveIntermediates/stagey_producer/BuildProductsPath/Release-iphoneos/stagey_producer.app/Frameworks
Symlinked...
rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Alamofire.framework" "/Users/benjaminhill/Library/Developer/Xcode/DerivedData/stagey_producer-dzqglqxhgmgoreferuvikcueqhdz/Build/Intermediates.noindex/ArchiveIntermediates/stagey_producer/InstallationBuildProductsLocation/Applications/stagey_producer.app/Frameworks"
sending incremental file list
rsync: [sender] change_dir "/Users/benjaminhill/src/stagey_producer/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos" failed: No such file or directory (2)

sent 19 bytes  received 12 bytes  62.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1356) [sender=3.2.7]
Command PhaseScriptExecution failed with a nonzero exit code
83qze16e

83qze16e1#

如果你在Xcode 14.3中导出构建时遇到错误,有一个好消息-- Cocoapods将很快发布一个构建(版本1.12.1)来解决这个问题。
在此期间,您可以尝试以下解决方案:导航到Pods/Target Support Files/Pods-ProjectName/目录并打开Pods-ProjectName-frameworks.sh文件。然后,将字符串"$(readlink "${source}")"替换为"$(readlink -f "${source}")"
来源:https://github.com/CocoaPods/CocoaPods/pull/11828
希望它能起作用。

nhaq1z21

nhaq1z212#

https://github.com/flutter/flutter/issues/123852
if [ -L“${source}”];then echo“Symlinked...”source="$(readlink -f“${source}”)”echo“已链接:${source}”fi

3phpmpom

3phpmpom3#

解决方法有两个步骤**第一步:**导航到Pod/Target Support Files/Pods-ProjectName/目录,打开Pods-ProjectName-frameworks.sh文件,将字符串“$(readlink“${source}”)”替换为“$(readlink -f“${source}”)”

**第二步:**升级所有Pod库,最低部署8.0到11.0

zour9fqk

zour9fqk4#

1.search xCode左下方的文件

Pods-[your project name]-frameworks

2.search 获取source="$(readlink "${source}")"并替换它

#    source="$(readlink "${source}")"
source="$(readlink -f "${source}")"

相关问题