None of the provided solutions worked
When running tns doctor I get the following warning, even though Xcode is installed:
WARNING: Xcode is not installed or is not configured properly.
You will not be able to build your projects for iOS or run them in the iOS Simulator.
To be able to build for iOS and run apps in the native emulator, verify that you have installed Xcode.
When trying to run the setup script, after confirming that I have Xcode installed, I get the following error:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Xcode is not installed or not configured properly. Download, install, set it up and run this script again.
iOS
I'm on High Sierra with Xcode 9.0.1 (both are the latest versions to this date). I've followed the official guide: https://docs.nativescript.org/angular/start/ns-setup-os-x
After running tns doctor I get the warnings as described above.
HI @philipfeldmann
Can yhou please run xcodebuild -version and paste the output?
May be Xcode is installed, but build tools are not.
If that is the case you can set them via xcode-select command or via UI of Xcode (Preferences -> Locations -> Command Line Tools).
That solved my issue, thanks for your fast answer, the support you guys offer is great.
Maybe it'd be a good idea to add this to the docs or the troubleshooting.
Anyway thank you, much love.
I'm glad to hear problem is solved.
Re documentation:
We will try to improve it, but if you notice something wrong you easily contribute.
At the end of articles there is Improve this article button which will open the source of the article which you can modify and send pull request.
This solved the same problem for me, too.
Setting the command line tools fixed the same issue for me as well
What? A suggestion on a forum that actually solves the problem? Holy cow! Are we recording this? It totally worked for me too! What a time to be alive!
I faced the same problem and setting up the command line tools within XCode fixed it. Thanks a lot!
Maybe you could add this hint to the installation instructions on the documentation site?
try run this line:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
This solved the problem for me, thank you!
This solved the problem for me too!
This line worked for me
sudo xcode-select --reset
Thanks @dondre ! Your solution worked for me 馃憤
This solved for me to:
Xcode 10.0
Build version 10A255
ProductName: Mac OS X
ProductVersion: 10.14
BuildVersion: 18A391
Running the xcode-select on the command line did not help, but going into Xcode (Preferences -> Location -> Command Line Tools) did. Thank you.
iMac:node giulio$ xcodebuild -version
Xcode 10.1
Build version 10B61
Please change the title, as this also occured on Mojave as well.
And the solution works too. Thanks.
Thank you, this worked for me too. 馃憤
thank you this worked for me.
xcode 11 on Mojave
xcode-select for whatever reason is not pointing to the right path after a fresh installation of Xcode. This will fix it:
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
how to avoid installing xcode on mac ... just working with android ?
Try sudo xcode-select --reset
The step for fix this should be on the documentation as a side note
Most helpful comment
HI @philipfeldmann
Can yhou please run
xcodebuild -versionand paste the output?May be Xcode is installed, but build tools are not.
If that is the case you can set them via
xcode-selectcommand or via UI of Xcode (Preferences -> Locations -> Command Line Tools).