Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Terminal does not find the installed Xcode

i have download and installed the Xcode 12.4 from apple site (not apple store) because I am using macOS Catalina 10.15.7 and the latest Xcode version right now requires at-least BigSur 11.0. I have also installed the latest Xcode command line tools.

xcode command line tools

But when i try to open my react native project in Xcode simulator from terminal using npm run ios it says,

"Xcode needs to be installed (don't worry, you won't have to use it), would you like to continue to the App Store? › (Y/n)"

By the way, I am a new mac user so, i don't know much about it yet. So, any kind of help will be appreciated.

like image 937
Usman Shahid Avatar asked Dec 01 '25 03:12

Usman Shahid


2 Answers

My bad, i have not selected the installed command line tools in Xcode. If anybody got this issue then make sure you also select the installed command line tools. Simply open Xcode, go to preference -> locations -> command line tools.

like image 99
Usman Shahid Avatar answered Dec 02 '25 17:12

Usman Shahid


If you're having this issue, running the command below in the terminal will also fix it for you.


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

like image 41
T33 Avatar answered Dec 02 '25 15:12

T33