ReactNative 版本 0.27.2 真機調試,一直紅屏,報錯
could not connect to development server
檢測流程:
1.工程目錄npm start OK
2.AppDelegate.m的localhost換成PC上的IP地址 192.168.0.103,且PC上的地址和手機上的同一局域網 OK
3.xcode提示
WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain
表示連接超時,解決方法RCTWebSocketExecutor.m中的localhost換成PC地址,據說新版本不用換了
Connection to http://localhost:8081/debugger-proxy timed out. Are you running node proxy? If you are running on the device, check if you have the right IP address in RCTWebSocketExecutor.m.
這個世界安靜了...