Reputation: 13855
After upgrading to RN 0.29.1 I dont have a URL in my AppDelegate.m file where I can say dev=false... is there an obvious way to turn off dev mode that I'm missing?
Upvotes: 3
Views: 707
Reputation: 410
edit your node_modules/react-native/packager/react-native-xcode.sh
file and remove xip.io
in some place(like china), xip.io service not work
Upvotes: 0
Reputation: 885
After spending some time looking through the RCTBundleUrlProvider code, I found this out:
If you add an ip.txt
file to your XCode project with the IP address inside of it it will use that to determine where to get index.ios
(without it defaults to localhost
)
dev=true
is enabled by default (when setDefaults
is called in AppDelegate.m)
You can change dev by setting enableDev
Upvotes: 1
Reputation: 2648
It doesn't seem as though facebook has updated the docs on how to use the new RCTBundleURLProvider
. For now I have just added back in the old URLWithString
from previous versions and it works just fine:
Add:
jsCodeLocation = [NSURL URLWithString:@"http://ipaddress:8081/index.ios.bundle?platform=ios&dev=true"];
Comment:
[[RCTBundleURLProvider sharedSettings] setDefaults];
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
Upvotes: 2