5

I just init-ed a React Native project and want to run on my iOS device, but when I go into Xcode I cannot find where I should set the IP of my dev computer.

[[RCTBundleURLProvider sharedSettings] setDefaults];
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
Pranav
  • 701
  • 4
  • 18

1 Answers1

0

As of react-native 0.44.0:

You need to create a file with name "ip.txt" and paste you macbook's IP address in a single line without any whitespace. Save this file and make sure your macbook and test device are on the same wi-fi. Whenever you want to fallback to the localhost, remove this file (or remove from your target).