Running Swift build in Terminal leading to "Platform Path" errors

Try fixing the SDK path (yours appears incorrect):

$ xcrun --show-sdk-path --sdk macosx

You might have this result:

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

Switch the default SDK location by invoking:

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

If that doesn't work then take a look inside the (normal) SDK path:

$ ls -lat /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

You should see the SDK's within that directory; if not you'll need to download them.

Tags:

Xcode

Swift