Unable to verify xcode and simulator installation

When running npm run ios some time an error comes $ react-native-scripts ios Starting packager… Starting simulator… Unable to check Xcode version: Error: Process exited with non-zero code: 1 Failed to start simulator: Unable to verify Xcode and Simulator installation. Exiting… The error can come if you don’t have any command line tool selected in xcode … Read more