Xcode stops working after installing "xcode-select -switch"

OMG, what have I done?

A few days ago I tried to use macport to install something, because I was using Xcode 4.3, and the command line tool was not installed by then macport was not working. Therefore, I followed the example guide for installing the command line tool, then used the following command:

sudo xcode-select -switch /Applications/Xcode.app/ 

which, I think, screwed everything except macport: now, in Xcode, even a simple iOS project with one view will not be compiled, it says: "UIKit / UIKit.h not found."

Does anyone know how to fix this? I do not want to install the giant Xcode again, today I have to do some iOS project, help!

+84
ios xcode macos
Mar 07 '12 at 11:29
source share
1 answer

You should point it to the Developer directory, not the Xcode application package. Run this:

 sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer 
+236
Mar 07 2018-12-12T00:
source share



All Articles