We are having a tool which internally create iPhone build using xcodebuild command line tool. It all working fine until Xcode14.3 release. Below is my build command
It uses SYMROOT and DSTROOT parameters to copy the build to a specific location in the project.
buildOutput=$PWD"/"$relativePath"/output"
relativePath is actually the path towards my iOS project
All other parameters are passing and working correctly. But when I use DSTROOT
I am getting below error
xcodebuild: error: “InstallationBuildProductsLocation” couldn’t be moved to “AdHoc 09-05-2023, 4.26 pm 2.xcarchive” because either the former doesn’t exist, or the folder containing the latter doesn’t exist.: The operation couldn’t be completed. No such file or directory
Below are the full error stack
2023-05-09 16:26:55.609 xcodebuild[24614:1420687] Writing error result bundle to /var/folders/vt/bxdl1j6x111fjsjmw5r11s680000gn/T/ResultBundle_2023-09-05_4-26-0055 pm.xcresult
xcodebuild: error: “InstallationBuildProductsLocation” couldn’t be moved to “AdHoc 09-05-2023, 4.26 pm 2.xcarchive” because either the former doesn’t exist, or the folder containing the latter doesn’t exist.: The operation couldn’t be completed. No such file or directory
but to my surprise, under the output
directory I can see the .app generated (output/Applications/myApp.app)
I am not sure why the build fails in this case. Because of the fail, I cannot proceed to next step of my build script. Could anyone please help me? I am spent lots of time but unable to find the reason behind this issue. Please help.
I started getting the exactly same error message from my library build script, after I updated my system to macOS 13.x and to Xcode 14.x (from macOS 12.x and Xcode 13.x)
By trial and error I came to the conclusion that the new Xcode stopped "liking" to have SYMROOT and DSTROOT paths/content separated from the Derived Data path/content when archiving my library products for distribution.
What worked for me was to start using
derivedDataPath
andarchivePath
instead ofSYMROOT
andDSTROOT
.Like so:
I can now find the built framework product at a slightly different location than before:
Maybe this will help you with your problem as well.
This is what I had before: