Xcodebuild in buildwrapper fails using Swift Packages on CI

Hello @kathleen-glooko and welcome to our community!

Without going too much into the details, the build wrapper will observe what processes are run by xcodebuild in order to record the compilation options (e.g., include search paths, to name only one). The socket is created and used by the build wrapper for that purpose. Any configuration required to make it work in the virtual device is specific to that device. Therefore, it’s really hard to provide meaningful advice there.

However, if you cannot solve this configuration issue, you can rely on a compilation database instead of the build wrapper. See this link for more information: Analysis Steps Using Compilation Database. There should be a few tools out there to generate the compilation database automatically, for example from xcodebuild's output using xcpretty.

I hope this helps.