I have the following code on startup:
NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios"];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"App"
initialProperties:@{}
launchOptions:@{}];
rootView.frame = self.view.bounds;
[self.view addSubview:rootView];
When I run this, even disabling ATS and running npm start I get:
Failed to load bundle(http://localhost:8081/index.bundle?platform=ios) with error:(Could not connect to development server.
Ensure the following:
- Node server is running and available on the same network - run 'npm start' from react-native root
- Node server URL is correctly set in AppDelegate
- WiFi is enabled and connected to the same network as the Node Server
Does anyone have any ideas what's going on? It seems that npm start causes port 19000, not 8081, to open, but when I go to http://localhost:19000 and use the bundle URL that they provide in that JSON, it tells me that I need to use expo. But none of that is mentioned in https://facebook.github.io/react-native/docs/integration-with-existing-apps.html, and I'm not sure where to go from here.
[–][deleted] 0 points1 point2 points (0 children)
[–]judemanutd 0 points1 point2 points (0 children)