When I run a react-native project, I get a error no bundle URL present , but I don\'t know what mistakes I do, I was very confused.
Solve the error No bundle URL present by:
rm -rf ios/build/; kill $(lsof -t -i:8081); react-native run-ios
echo "alias rni=\"kill \$(lsof -t -i:8081); rm -rf ios/build/; react-native run-ios\"" >> ~/.bashrc; source ~/.bashrc
Now you can run React Native iOS build (without worrying about some of the common red error screens of death appearing) with a simple alias shortcut:
rni