0

react-native issue

project reload, at the top of screen,it show loading from prebundled file,i want that loading from port,how can i do? thanks in advance! I tried edit the scheme from debug to release,but it seem nothing useful!

user7871794
  • 51
  • 1
  • 3
  • https://stackoverflow.com/questions/41713678/react-native-using-pre-bundled-file-on-device-even-if-dev-mode/41713807 possible duplicated – LeonHeart Apr 11 '19 at 07:04

1 Answers1

0

For iOS, modify the AppDelegate.m and fix jsCodeLocation to something like this

#ifdef DEBUG jsCodeLocation = [NSURL URLWithString:@"http://192.168.1.10.nip.io:8081/index.ios.bundle?platform=ios&dev=true"]; #else jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; #endif

Replace 192.168.1.10.nip.io:8081 with the address of your packager.

Travis White
  • 1,977
  • 1
  • 11
  • 19