react-native: El capitan: No such file or directory
Since upgrading to El Capitan, I cannot connect to the react packager when using a local IP (e.g. 192.168.178.26), however it’s working with “localhost”. Please note: It’s only not working when using an iOS 9.0 simulator. The 8.x simulators are working quite fine. Not working:
jsCodeLocation = [NSURL URLWithString:@"http://192.168.178.26:8081/index.ios.bundle?platform=ios"];
Working:
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios"];
I get the following redbox:
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 19 (6 by maintainers)
If you’re always running the simulator on localhost and only need the IP for devices, you can try this in AppDelegate: