Swift: <unknown>:0: error: Swift does not support the SDK 'MacOSX10.14.sdk'

Created on 28 Jun 2019  路  5Comments  路  Source: tensorflow/swift

  • Toolchain v0.4.0
  • macOS 10.14.5

    - Xcode 10.2.1

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?

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

export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/

All 5 comments

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:

  1. Install the Xcode 11 beta from https://developer.apple.com/download/
  2. Make sure the app Xcode-beta is in your Applications folder (I had to move it from downloads)
  3. run 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:

  1. Install the Xcode 11 beta from https://developer.apple.com/download/
  2. Make sure the app Xcode-beta is in your Applications folder (I had to move it from downloads)
  3. run 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.

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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RogerS49 picture RogerS49  路  5Comments

noahtren picture noahtren  路  5Comments

donn picture donn  路  3Comments

ifsheldon picture ifsheldon  路  4Comments

AsherYartsevTech picture AsherYartsevTech  路  4Comments