I updated my Xcode but not able to build. It\'s failing with:
:0: error: unable to load standard library for target \'arm64-appl
What fixed the issue in my case was clearing the environment. Apparently when running a script build phase in Xcode, there are some environment variables set which may interfere with the resolution of the Swift standard library. I had this issue while performing a carthage build from an Xcode "Run Script" phase.
Perform a command by clearing the environment with:
env -i
You may want to keep the PATH and DEVELOPER_DIR environment variables though, in particular when you have multiple Xcode versions installed.
so in your case
env -i DEVELOPER_DIR="$DEVELOPER_DIR" PATH="$PATH" xcodebuild ...