The official React Native documentation to run app on iOS device using offline bundle says
Open ios/YourApp/AppDelegate.m
Uncomment the line, jsCodeLocation = [[NSBundle mainBundle] ...
Using latest react-native 0.30.0, this line is no longer present in the default AppDelegate.m file. Excerpt from the default AppDelegate.m file
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"TestAppDelete"
initialProperties:nil
launchOptions:launchOptions];
If I try to use the jsCodeLocation as it used to be in previous versions, it is returned as null
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
I am not sure why is the URL for main.jsbundle returned as null. Is it not created by the packager anymore. If it should be created using the latest version also, how can I confirm it?
If you have run a react-native 0.30.0 app on an iOS device using offline bundle, please share the instructions to do so.