Is there a way to automatically set the Debug server host & port for device in react-native apps?
I have to trigger this menu and set a proxy for my app and I want it to be done automatically when the app is installed. Is that possible?
Is there a way to automatically set the Debug server host & port for device in react-native apps?
I have to trigger this menu and set a proxy for my app and I want it to be done automatically when the app is installed. Is that possible?
I wrote a little package for this because it was driving me nuts. Check it out here:
npm i @nick-bull/react-native-debug-address
# DEBUG_HOST=127.0.0.1:8081 npx react-native start --port 8081
# or, equivalently
DEBUG_PORT=8081 npx react-native start --port 8081
npx react-native run-android --port 8081
Try this :
add to package.json scripts
"android": "react-native run-android --host=<ip-address>:8081"
then to run to start up project
npm run android
Or:
take a look at this
© 2022 - 2024 — McMap. All rights reserved.
error: unknown option ``--host
'` – Isadoraisadore