Reputation: 4720
I have Xcode 6.2 Beta. Attempting
xcrun simctl
in terminal
yields
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
Upvotes: 388
Views: 231261
Reputation: 11
For me I got that error when I was running React Native with Expo
Xcode Version: Version 16.1 (16B40)
Solution:
sudo xcode-select --reset
Upvotes: 1
Reputation: 33
adding command line tools matching the installed xcode version in xcode -> preference -> locations works fine
Upvotes: 2
Reputation: 2129
In Terminal, try this.
sudo xcode-select -s /Applications/Xcode.app
/Applications/Xcode.app is your Xcode.app path.
If you still get an error in the terminal.
try sudo xcodebuild -license
to agree to the license.
Upvotes: 139
Reputation: 29
You are facing this issue because the path of command line tools are not configured correctly in your XCode. Please navigate to Xcode > Settings > Locations tab . Unselect and select the XCode version name option and that should resolve this issue.
Upvotes: 3
Reputation: 9
following are the steps to solve this issue -
Upvotes: -2
Reputation: 702
Had this issue after the latest version of XCode (Version 14.0 (14A309)) installed itself.
For me the Command Lint Tools were all installed etc and it made no sense; none of the above worked. However when running xcrun -v simctl
it showed me that my SDKPATH was set to version 15.5 of the SDK; the new version is 16.0.
To resolve I added the below line to the top of my .zshrc
file and restarted my terminal.
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
Note: The 'file' iPhoneSimulator.sdk is a simlink to the latest SDK version so I hope I don't need to change this again!
Upvotes: 12
Reputation: 1121
Got similar issue on executing command
./Scripts/bootstrap.sh -d.
This helped me Xcode > Preferences > Locations, Set Command line Tools
Upvotes: 101
Reputation: 437
Choose Xcode Preferences then choose Locations tab and inside go to command line tools Drop down box and choose one.
Problem sovled !
FYI: I tried this with Xcode 12.3
Upvotes: 9
Reputation: 9201
I solved this problem by entering
Xcode > Preferences > Locations
And assigning the Command Line Tools
This is in Xcode Version 7.2 beta (7C46t)
Upvotes: 908
Reputation: 855
While running Xcode, open the Xcode menu, go to Preferences…, then select Locations
In Locations, "Command Line Tools", choose your version of Xcode.
It should be fine. This worked for me.
Upvotes: 9
Reputation: 2477
In Xcode, open the Xcode menu at the top, then select Preferences…, and then select the Locations tab.
Upvotes: 141
Reputation: 1266
If you are interested in command line "approach", please try: installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target /
. In addition, please make sure that xcode-select -s
selected right Xcode installation path.
Upvotes: 3
Reputation: 181
I had the same problem. My application was working well but suddenly in next run, it started throwing the "simctl" error. It seems I had started Xcode update installation in the background.
Fix: I just started the Xcode application and it prompted to install some pending tools update. After Xcode updates, my app started working normally.
Upvotes: 13