Bri Bri
Bri Bri

Reputation: 2260

Cannot build any Swift project at all due to strange error about MacOSX10.11.sdk

I'm running macOS 10.12.3 with Xcode 8.3.

I cannot build any macOS Swift projects with it.

If I create a new Cocoa application Xcode project and set it to use Swift, when I try to compile it, I immediately get the following error in the "check dependencies" phase:

error: There is no SDK with the name or path '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk'

I have no idea what's going wrong!

The only clue I have is that earlier I created a symlink with the path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk that pointed to MacOSX.sdk in order to fix an issue where an older build of Qt that required an SDK with that path. However, deleting the symlink has no effect.

I can build Swift projects that targeting other platforms like iOS. Just not macOS.

Help!

Upvotes: 0

Views: 90

Answers (1)

Eric Scott Phung
Eric Scott Phung

Reputation: 24

try running this command then reopening the project (Xcode uses xtools in the command line to build its projects)

sudo xcode-select -switch /path/to/file/

(by default the path is)/Applications/Xcode.app/

look at this pic

saw it here yesterday

Upvotes: 1

Related Questions