opening App after React Native offline packaging prompts the following error:
2018-04-16 14:43:50.966 [fatal][tid:main] No bundle URL present.
Make sure you"re running a packager server or have included a .jsbundle file in your application bundle.
2018-04-16 14:43:50.968629+0800 myapp[20467:9210948] No bundle URL present.
Make sure you"re running a packager server or have included a .jsbundle file in your application bundle.
2018-04-16 14:43:50.968868+0800 myapp[20467:9210948] *** Terminating app due to uncaught exception "RCTFatalException: No bundle URL present.
Make sure you"re running a packager server or have included a .jsbundle file in your application bundle.", reason: "No bundle URL present.
Make sure you"re running a packager server or have ..."
*** First throw call stack:
(0x184e1ad8c 0x183fd45ec 0x104c3bd84 0x104c26d28 0x104fd5260 0x104fd5220 0x104fd9db0 0x184dc3070 0x184dc0bc8 0x184ce0da8 0x186cc3020 0x18ecc178c 0x104c126f0 0x184771fc0)
libcPPabi.dylib: terminating with uncaught exception of type NSException
I have used the command react-native bundle--dev false-- entry-file index.ios.js-- bundle-output bundle/index.ios.jsbundle-- platform ios
to generate the js file and add it to the project, as shown below:
AppDelegate.m
configuration code is as follows:
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"assets/index.ios" withExtension:@"jsbundle"];
Open the above error after running successfully, how to solve it?