I have a problem regarding the metro bundler of react native (ios).
When I run npx react-native run-ios
, a simulator is started and a terminal window pops up for the metro bundler, but the simulator does not connect to the metro bundler.
I previously had the following error: "No bundle url represent". I deleted the main.jsbundle file and generated a new one with the following command:
npx react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'
This generated a new main.jsbundle file, and I've added this to the Copy Bundle Resources tab under the build phases of my app in xcode.
When I "shake" the simulator and configure the bundler (127.0.0.1:8081 index), it starts working, but I want it to work directly when I run npx react-native run-ios
, without have to update the bundler every single time. It worked before, it just stopped working.