React Native throws error, “xcrun: error: unable to find utility “instruments”, not a developer tool or in path” on iOS when command line tools location is not set. The exact error looks like this –
Found Xcode project TestProject.xcodeproj xcrun: error: unable to find utility "instruments", not a developer tool or in PATH Command failed: xcrun instruments -s xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
You will get the error when you run command – react-native run-ios
.
Follow these steps to solve this issue –
- Open XCode.
- Select XCode menu.
- Open Preferences.
- Goto Locations tab.
- You will find command line tools option. Select latest XCode version from drop down menu.
- Exit XCode.
If you want to do it with terminal then follow this –
- If XCode downloaded, run this command:
sudo xcode-select -s /Applications/Xcode.app
- If XCode not installed:
xcode-select --install
Accept license using this:sudo xcodebuild -license accept
This will solve your issue of xcrun: error: unable to find utility “instruments”, not a developer tool or in path.