I am following the tutorial on the official React Native website.
Using the following to build my project:
react-native run-ios
I get the error:
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
Although, when I run the app from the .xcodeproj, everything works fine.
Any suggestions?
Plug in your device via USBConnect your iOS device to your Mac using a USB to Lightning cable. Navigate to the ios folder in your project, then open the . xcodeproj file, or if you are using CocoaPods open . xcworkspace , within it using Xcode.
Open your react native app's directory, navigate to ios folder, and double-click on . xcworkspace file to open the Xcode. Next, open the Product menu, go to Destination, and select your device. If you don't have an Apple Developer account, you must create one to be able to run your project on an iOS device.
Check out this link (Running react-native run-ios occurs an error?). It appears to be a problem with the location of Command line tools
.
In Xcode, select Xcode menu, then Preferences, then Locations tab. Select your Xcode version from the dropdown and exit Xcode.
You may need to install or set the location of the Xcode Command Line Tools.
If you have Xcode downloaded you can run the following to set the path:
sudo xcode-select -s /Applications/Xcode.app
If the command line tools haven't been installed yet, you may need to run this first:
xcode-select --install
You may need to accept the Xcode license before installing command line tools:
sudo xcodebuild -license accept
Or adjust the Command Line Tools
setting via Xcode (Xcode > Preferences > Locations
):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With