I am following the tutorial on the official React Native website.
Using the following to build my project:
react-native run-ios
I g
In my case the problem was that Xcode was not installed.
For any such problem:
.expo
folderapk-cache
and you are done..
Hope it helps?
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.
Problem is your Xcode version is not set on Command Line Tools, to solve this problem open Xcode>Menu>preferences> location> here for Command Line tools select your Xcode version, that's it.
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
):
For me, it turns out that there was an iOS system update pending asking to restart the computer. Restart and let the update finish solved my problem.