• 在有pods的项目中,xcode14.3之后打包出现如下错误
1
command phasescriptexecution failed with a nonzero exit code
  • 原因及解决方法如下

There is an issue with Cocoapods now, because Xcode 14.3 is now using a relative path in its symlink for frameworks.

Either wait for release of Cocoapods version 1.12.1 or make this simple change in your Pods-APPNAME-frameworks.sh file:

Replace:

1
2
3
4
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi

with:

1
2
3
4
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink -f "${source}")"
fi

Note that -f was added.

参考链接:

https://developer.apple.com/forums/thread/727525