Device info native module is not installed correctly when install JSBundle at native app
See original GitHub issueFirst, I make the RN project to the JSBundle and the image resource to the assets file. Then, I put the JSBundle(Change its name from main to bp) and the assets file to the native ios project(for assets file I choose create folder reference) And, when I click a Button and load the JSBundle, the Simulator show this error “Device info native module is not installed correctly”. I check the SOF answers and the issues #176, so reinstall my node_modules, but not work.And I’m sure there is just this project run at 8081. The point is my RN is ok when just run itself. The platform is ios and the IDE is of course xcode in mac. And here is my info of package.json: `{
"name": "BP",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "0.45.1",
"react-native-deprecated-custom-components": "^0.1.0",
"react-navigation": "^1.0.0-beta.11"
},
"devDependencies": {
"babel-jest": "20.0.3",
"babel-preset-react-native": "2.0.0",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
} `
And here is how I load JSBundle.
NSURL *jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"bp" withExtension:@"jsbundle"]; RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"App" initialProperties:nil launchOptions:nil]; UIViewController *vc = [UIViewController new]; vc.view = rootView; [self.navigationController pushViewController:vc animated:YES];
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top GitHub Comments
you should input adb reverse tcp:8081 tcp:8081
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.