解决ReactNative在iPhone真机调试报错:Connection to http://localhost:8081/debugger-proxy?role=client timed out. Are you running node proxy? If you are running on the device, check if you have the right IP addres

报错如下:

解决ReactNative在iPhone真机调试报错:Connection to http://localhost:8081/debugger-proxy?role=client timed out. Are you running node proxy? If you are running on the device, check if you have the right IP addres_第1张图片

解决办法:在RCTWebSocketExecutor.m文件里面的setup方法里面,修改host为电脑的IP地址,注意要把手机wifi和电脑的WiFi在同一个局域网下

解决ReactNative在iPhone真机调试报错:Connection to http://localhost:8081/debugger-proxy?role=client timed out. Are you running node proxy? If you are running on the device, check if you have the right IP addres_第2张图片

你可能感兴趣的:(解决ReactNative在iPhone真机调试报错:Connection to http://localhost:8081/debugger-proxy?role=client timed out. Are you running node proxy? If you are running on the device, check if you have the right IP addres)