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
I just ran into this problem as well (first time getting started with React Native). The problem disappeared when - while an ios simulation(react-native run-ios) was running - I ran npm install and then react-native run-ios again. In the terminal window, it showed that it was bundling, and then the simulator showed the welcome screen.
Check this link for briefs after react-native init PropertyFinder line try to use npm start (This one works for me)
========================================================================
UPDATE for 16.9
My port 8081 was blocked by McAfee. Using a different port directly wasn't working react-native start --port=8082 and react-native run-ios --port=8082
Tried almost all solutions given here. but anything didn't work.
"react": "16.9.0",
"react-dom": "^16.12.0",
"react-native": "0.61.5",
Solution:
Searched for 8081 in Xcode and replaced all of them with 8082. Then run the same commands to build and run the app. App works smoothly
react-native start --port=8082
react-native run-ios --port=8082
This problem happens when you not allow unsecure connections via localhost, or maybe you tried to accept unsecure connections via http.
To fix this, add this on info.plist:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>