Skip to content

Instantly share code, notes, and snippets.

@Obooman
Created December 10, 2017 14:44
Show Gist options
  • Save Obooman/04ff46a2aa6658567522bcce7c936564 to your computer and use it in GitHub Desktop.
Save Obooman/04ff46a2aa6658567522bcce7c936564 to your computer and use it in GitHub Desktop.
change rn load source url
// Run from locally running dev server
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
// Run on device with code coming from dev server on PC (change the IP to your PCs IP)
// jsCodeLocation = [NSURL URLWithString:@"http://192.168.1.168:8081/index.ios.bundle"];
// For production load from pre-bundled file on disk. To re-generate the static bundle, run
// $ curl http://localhost:8081/index.ios.bundle -o main.jsbundle
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment