After passing through the path, when I launched swift on Terminal, I got <unknown>: 0: error: Swift does not support the SDK 'MacOSX 10.14 .sdk'.
Do I need macOS 10.15 beta or Xcode 11, by any chance?
Try the following
export SDKROOT=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
If it does work, you can add it to your ~/.bash_profile or ~/.zshrc.
I fixed this error by:
sudo xcode-select -s /Applications/Xcode-beta.app from the command line.I had also set SDKROOT as mentioned above but without step 3 above this did not resolve the error.
I fixed this error by:
- Install the Xcode 11 beta from https://developer.apple.com/download/
- Make sure the app Xcode-beta is in your Applications folder (I had to move it from downloads)
- run
sudo xcode-select -s /Applications/Xcode-beta.appfrom the command line.I had also set SDKROOT as mentioned above but without step 3 above this did not resolve the error.
It was solved after you put your solution into practice! THANK YOU!!
If you don't want to download the Xcode beta and wish to continue using Xcode 10, you can solve this by
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/
@bendecoste , I have Xcode 10.3, and your solution doesn't work for me :(, other suggestions what can be done?
Most helpful comment
If you don't want to download the Xcode beta and wish to continue using Xcode 10, you can solve this by