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 <command>
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 ...
I got this issue a few days back so what I did was
Doing this helped me to resolve the issue and I was able to run the application again
Try to add iOS 10 simulator to your xCode.
Install latest Xcode 10 GM seed, facing same issue tried many solution but after updating to new Xcode issue resolved. if still issue be there then try this go to File and project setting, set build system to legacy build system, clean and build.
Thanks for the all answers but seems it's Xcode installation bug ..I dowloaded Xcode again and tested everything works fine in my case.
For me, the following solved the problem:
From the target build Setting
setting Architectures to $(NATIVE_ARCH)
and add $(ARCHS_STANDARD)
to Valid Architectures.
This might help What's the difference between "Architectures" and "Valid Architectures" in Xcode Build Settings?