skip to Main Content

I have been using react native 0.68 version on my new mac m1 pro chip.
My code is working on android but on iOS i am getting "no bundle URL present error".
If i manually create main.jsbundle file and then run it, then the app is working fine but, for that every-time i need to create the bundle file if i am updating my code.

So, any one have face this kind of issue?

NoBundleURLError

3

Answers


  1. Chosen as BEST ANSWER

    I solved by doing this:

    Open host file sudo vi /private/etc/hosts Add three line if it's not exist

    127.0.0.1 localhost
    255.255.255.255 localhost
    ::1 localhost
    

  2. Open a terminal window
    cd into YOUR_PROJECT/ios
    Remove the build folder with

    rm -r build
    

    Run

    react-native run-ios 
    

    again.

    Alternatively, you could open Finder, navigate to YOUR_PROJECT/ios and delete the build folder.

    Then run react-native run-ios again.

    Login or Signup to reply.
  3. --> open ios file project with xcode
    --> in project bundle delete main.jsbundle file
    --> add new empty file by main.jsbundle name
    -->Run command: react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
    --> now react-native run-ios
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search