xcodebuild with a framework under $TMPDIR fails

Hi,

I tried to use xcodebuild with a .framework under $TMPDIR, but it failed like this

$ xcodebuild -create-xcframework -framework $TMPDIR/Hello.framework -output Hello.xcframework
error: cannot compute path of binary 'Path(str: "/private/var/folders/60/khbk2xqn1c5bml1byjn89dwc0000gn/T/Hello.framework/Versions/A/Hello")' relative to that of '/var/folders/60/khbk2xqn1c5bml1byjn89dwc0000gn/T/Hello.framework'

I think xcodebuild failed to resolve fullpaths with symblic links, as /var is a symbolic link to /private/var.

The Xcode version is 15.0. I think Xcode <15 didin't have this issue.

Thanks,

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

We were using the following build command with xcode 14.3:

    -framework $PROJECT_DIR/../devices/Build/Intermediates.noindex/ArchiveIntermediates/myFramework/BuildProductsPath/Release-iphoneos/myFramework.framework \
   -framework $PROJECT_DIR/../simulators/Build/Intermediates.noindex/ArchiveIntermediates/myFramework/BuildProductsPath/Release-iphonesimulator/myFramework.framework \
  -output $PROJECT_DIR/../output/myFramework.xcframework

And we are experiencing the same issue. How can we solve this?

xcodebuild with a framework under $TMPDIR fails
 
 
Q