The answer I found here worked.
https://onexlab-io.medium.com/no-bundle-url-present-fixed-ca2688a80f66
Step 1:
- Open the package.json file and add the following line
'"build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='iOS'"'
- Now your file looks like this following screenshot
Step 2:
Step 3:
- Open iOS project in Xcode show as following screenshot
Select -> Target → Build Phases
under Copy Bundle Resources click
on the plus button as following screenshot.
- It will show you the prompt as shown below. Then select the file
main.jsbundle and click on the Add button
Step 4:
Try to re-run your app
npx react-native run-ios
or
react-native run-ios
Step 5:
TA DA!!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…