Tôi dường như không thể hiểu được điều này. Khi nào tôi mở ứng dụng React Native, tôi nhận được các lỗi này. Điều tốt nhất tôi đã tìm thấy là nó liên quan đến cách các ứng dụng đang được đóng gói. Bất kỳ trợ giúp nào cũng sẽ được đánh giá cao và được bình chọn! Cảm ơn!Lỗi React Native SocketProtocol và TimeoutError
lỗi từ Xcode
2016-06-16 17:21:50.160 [warn][tid:com.facebook.react.JavaScript] [TimeoutError: Event response for 'login' timed out]
2016-06-16 17:21:51.580 [warn][tid:com.facebook.react.JavaScript] [SocketProtocolError: Socket hung
phiên bản
"react": "^15.1.0",
"react-native": "^0.27.2"
... along with about 30 others
ios - AppDelegate.m
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
/**
* OPTION 2
* Load from pre-bundled file on disk. The static bundle is automatically
* generated by the "Bundle React Native code and images" build step when
* running the project on an actual device or running the project on the
* simulator in the "Release" build configuration.
*/
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"MyApp"
initialProperties:nil
launchOptions:launchOptions];