240

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

alexander.sivak
  • 3,034
  • 3
  • 12
  • 21
  • My app was running without issue then suddenly I came across this. I had no license to agree to and command line tools was set. A simple reboot of my machine worked. – StoriKnow Nov 27 '20 at 18:33

9 Answers9

619

I solved this problem by entering

Xcode > Preferences > Locations 

And assigning the Command Line Tools

This is in Xcode Version 7.2 beta (7C46t) enter image description here

skywinder
  • 20,546
  • 15
  • 87
  • 122
fbozo
  • 6,311
  • 1
  • 11
  • 8
97

In Xcode, open the Xcode menu at the top, then select Preferences…, and then select the Locations tab.

Xcode screenshot

shim
  • 7,170
  • 10
  • 62
  • 95
coders
  • 1,699
  • 9
  • 18
53

In Terminal, try this.

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

/Applications/Xcode.app is your Xcode.app path.

if U still get error in terminal.

try sudo xcodebuild -license to agree license.

leo.tan
  • 786
  • 6
  • 10
21

Got similar issue on executing command

./Scripts/bootstrap.sh -d.

This helped me Xcode > Preferences > Locations, Set Command line Tools

enter image description here

Gulshan Nadaph
  • 321
  • 2
  • 5
11

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.

jsr
  • 161
  • 1
  • 4
6

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.

shim
  • 7,170
  • 10
  • 62
  • 95
Rawand Saeed
  • 575
  • 7
  • 9
2

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.

Serzas
  • 346
  • 3
  • 8
2

adding xcode in preference-> locations works fine

Anshu
  • 35
  • 3
1

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

Amogam
  • 47
  • 5