Run React Native iOS without Packager

1.6k Views Asked by At

I am trying to build my app for React Native iOS, but the packager can't run since React Native only listens to port 8081 and port 8081 is taken by McAfee which can't be removed. How can I run React Native without using the packager?

Any help is appreciated!

2

There are 2 best solutions below

0
On

Hey try using another port.

npx react-native run-ios --port 8088
npx react-native start --port=8088
  1. "run-ios --port" is running IOS with the following port 8088
  2. "start --port" is running metro in the port 8088.

Aditional

After start you can open the app and follow those steps https://stackoverflow.com/a/71767276/5963210

1
On

Try the release scheme. I think it works without using a packager.

https://facebook.github.io/react-native/docs/running-on-device.html#2-configure-release-scheme