skip to Main Content

I’ve set up a react native app and want to use xcode to build/run the projectName.xcworkspace file but I run into this error.

I tried the same with a brand new react native project I created without changing anything and I get the same error. What does this mean and how do I solve it?

This is the error

2

Answers


  1. This usually means that your app is not connected to your localhost (metro bundler is not running). To solve this, you can try running the following commands:
    react-native start, then react-native run-ios (this will automatically build the app so there is no need to build it in xcode).

    If the problem still persists, then you might have to check your localhost port and make sure that the app is using port 8081.

    Login or Signup to reply.
  2. run

    react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'
    

    in your root folder

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search