Xcodeを14.3に更新したらArchiveがエラーになりました。
Command PhaseScriptExecution failed with a nonzero exit code
ログを見ると、このあたりでエラーになっているようです。
building file list ... rsync: link_stat "/sers/yamamoto/myapp/ios/MyApp/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FLAnimatedImage.framework" failed: No such file or directory (2)
「Upgrade from Xcode 14.2 to 14.3 rsync: link_stat failed: No such file or directory (2) for pods that were working earlier. · Issue #11808 · CocoaPods/CocoaPods」に書かれている次の方法で回避できます。
Workaround is to update all the generated ...-frameworks.sh files to add the -f flag to the call to readlink. In other words, replace
source="$(readlink "${source}")"
with
source="$(readlink -f "${source}")"
This is my first time contributing to CocoaPods though, so take it with a grain of salt!
XcodeでPods-XXXX-frameworks.shを開いて、
source="$(readlink "${source}")"
の行を
source="$(readlink -f "${source}")"
に置換します。
もう一度Archieveすると、今度はエラーにならず実行できました。
追記
この問題はCocoaPods 1.12.1 (2023-04-18)で修正されました。(参考)
CocoaPodsを1.12.1に更新すると問題は発生しなくなりました。