I've come across a bug that seems to have been introduced with Xcode 14.3, although it may have been caused by something else.
In my Build Phases, I have a phase called "[CP] Embed Pods Frameworks". That invokes a script called Pods-myapp-frameworks.sh That script fails when one of the frameworks is in a symbolically-linked folder.
The highlighted text in the build log shows the problem. It's resolved the symbolic link with a path relative to the symbolic link, and an absolute path is needed.
The path is resolved in the following code in the script (lines 42 - 45 in my copy of the script):
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
The readlink is defaulting to a relative path. Adding -f makes its output an absolute path, and all is well:
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink -f "${source}")"
fi
However, this script looks like it's been generated. I can edit it and it isn't overwritten when I rebuild, but I suspect next time I add a Pod or similar I'll be back to where I was.
So: where does this script come from? If it's generated, how do I get it to generate the correct readlink code? And is this a bug in Xcode or something that I've somehow created myself?
Update to CocoaPods 1.12.1 to get the fix. More details at https://github.com/CocoaPods/CocoaPods/pull/11828
I have solved with updating cocoapods to the last version by runnning sudo gem install cocoapods
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With