xcodebuild -create-xcframework not working in Xcode 15.0

Hello! I have found a weird behavior change when running xcodebuild -create-xcframework in Xcode 15 compared to running it in Xcode 14.3.1. If I run the command like this in Xcode 15:

xcodebuild 
-create-xcframework 
-framework "pathToFrameworkInATemporaryDirectory"
-debug-symbols "pathToDebugSymbols" 
-output "Something.xcframework"

I get this error:

error: cannot compute path of binary 'Path(str: "temporaryPathToTheUnixExecutableFile")' relative to that of 'temporaryPathToTheFramework'

But if I trace that path to the unix executable file in the framework, it is present.

If I run that same command in Xcode 14.3.1, it works fine.

I can create the xcframework successfully in Xcode 15 if I don't copy the framework to a temporary directory before calling xcodebuild -create-xcframework and I use that original path.

Why is this problem happening now in Xcode 15?

Any help is appreciated, thank you.

Sorry we mean an xcodebuild of this form (please ignore previous post)

xcodebuild -create-xcframework
-archive "${CUSTOM_DIR_PREFIX}/***-${CONFIGURATION}.xcarchive" -framework "***.framework"
-archive "${CUSTOM_DIR_PREFIX}/***-${CONFIGURATION}.xcarchive" -framework "***.framework"
-output "${FRAMEWORK_LOCATION}"

It might seem that the new xcodebuild has trouble with symlinks; does OP also use symlinks? @klinee101

I had this same problem and got round it by transforming the symlink into it's real location before running xcodebuild, this then worked for me

eg

TMPDIR=$(cd -P "$TMPDIR" && pwd)
xcodebuild -create-xcframework -framework $TMPDIR/Hello.framework -output Hello.xcframework
xcodebuild -create-xcframework not working in Xcode 15.0
 
 
Q