"Unexpected Failure" compiling with Xcode and code generated with CocoaPods

I've been using CocoaPods.org very successfully for a number of years. My applications are almost all Objective-C but sometimes I include Swift.

Just recently, with the upgrade to macOS Sonoma 14.2.1, almost all my Xcode 15.1 builds are getting an error:

Unexpected Failure

I tracked this down to a file, when Swift is included, that is generated from CocaPods with a name like:

./Pods/Target Support Files/Pods-APPLICATION/Pods-APPLICATION-resources.sh

This is the shell script segment that is generating the error:

function on_error {
  echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR

The Unexpected failure is occurring in this portion of the script - but in this case because realpath -mq is a wrong way of using realpath - as the -mq is an invalid option. This might be a macOS change.

But it really just masks the reason that on_error was called.

All of my applications that were working are getting this same error, and this is without making any changes.

Has anyone else encountered this recent problem? I'm stuck.

"Unexpected Failure" compiling with Xcode and code generated with CocoaPods
 
 
Q