I have a react native app, if I run it on the iOS simulator it works and can connect to the running packager that is running on localhost:8081, however if I try to run the app on an actual iOS device, it fails because it can't load the js bundle because it can't find the packager service.
My device and my dev server are on the same WIFI network, how does the app determine where the pacakger service lives? If I modify the AppDelegate.m file and replace:
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
//with an explicit IP address, then the app works:
jsCodeLocation = [NSURL URLWithString:@"http://192.168.0.9:8081/index.ios.bundle?platform=ios&dev=true"];
Any tips on settings I may need to modify for running on an actual device, without having to explicitly modify this file.
Thanks.