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.
For me the issue was it couldn't create the JS bundle. It doesn't state the error when building from Xcode so there is no way for you to know this. To find the error run the following command.
react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output ./ios/release/main.jsbundle --assets-dest ./ios/release/main.jsbundle
For me the error was something with missing PureRenderMixin component. To which the solution can be found here: https://github.com/facebook/react-native/issues/13078. Basicly you have to manually install react@16.0.0-alpha.3. This can be done via running this command.
npm i --save react@16.0.0-alpha.3
This issue is now happening for everybody because newer versions of react alphas are being released (particularly alpha.5) and they are breaking react-native builds.
I had this same issue. But my problem was my Mac and iPhone were not in same wifi network.
So ensure that they are all in same network and rebuild once again. If this is not the case, try the solutions mentioned by other members here.
following these steps:
youtube link: https://www.youtube.com/watch?v=eCs2GsWNkoo
In my case the problem was fixed by restarting the adb
server: adb kill-server && adb start-server
make sure you have .jsbundle in your your project
Add
react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios
in your react native code try to reopen the project
This is an issue with react-native v0.42.1. Try to close all terminal and XCode instances and run:
launchctl unload ~/Library/LaunchAgents/com.github.facebook.watchman.plist
watchman version
react-native run-ios