Nativescript doesn't recognize Xcode (High Sierra)
Asked Answered
S

3

23

I'm on High Sierra with Xcode Version 9.0.1 (9A1004). When running tns doctor I get the following warning:

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.

If I run the installation script, furthermore I get:

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.

As you might have guessed, I have Xcode installed from the app store and I've also installed cocoapods and xcodeproj. This is the only warning that I get.

Any suggestions?

Scow answered 21/10, 2017 at 10:51 Comment(0)
I
63

Run the following command:

sudo xcode-select --reset

I found this answer here:

http://overengineer.net/fixing-nativescript-s-xcode-is-not-installed-or-is-not-configured-properly-on-macos

Incumber answered 5/12, 2017 at 0:53 Comment(3)
Thank you, DuckDuckGo, for getting me to this answer.Guanine
Worked on Mojave too.Duodiode
Super. worked on NativescriptPrue
A
2

I had this problem today, but running the recommended command didn't help. I found that running the command

$ tns doctor

walked me through a series of prompts and corrected the issue. I did have to restart my terminal after the program completed in order for it to take effect.

Alcohol answered 24/6, 2018 at 21:23 Comment(0)
B
1

Open Xcode than go to Preferences -> Locations -> Command Line Tools after that it'll automatically take a path for the same. The system may ask for sudo password.

Brail answered 2/1, 2020 at 10:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.