From 9845f49581023302fcb33487bd6df2f7ce8825fa Mon Sep 17 00:00:00 2001 From: Nathan Azaria Date: Wed, 22 Jun 2016 07:09:51 -0700 Subject: [PATCH] Fixed setDefaults not being called in React Native apps, fixed typo Reviewed By: javache Differential Revision: D3469296 fbshipit-source-id: 032472fede4bfbd051b0f725f35368b22edcc130 --- React/Base/RCTBundleURLProvider.m | 2 +- local-cli/generator-ios/templates/app/AppDelegate.m | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/React/Base/RCTBundleURLProvider.m b/React/Base/RCTBundleURLProvider.m index fe00e1414..7fe1741f1 100644 --- a/React/Base/RCTBundleURLProvider.m +++ b/React/Base/RCTBundleURLProvider.m @@ -162,7 +162,7 @@ static NSString *serverRootWithHost(NSString *host) [self updateDefaults:@(enableDev) forKey:kRCTEnableDevKey]; } -- (void)setEnableEnableLiveReload:(BOOL)enableLiveReload +- (void)setEnableLiveReload:(BOOL)enableLiveReload { [self updateDefaults:@(enableLiveReload) forKey:kRCTEnableLiveReloadKey]; } diff --git a/local-cli/generator-ios/templates/app/AppDelegate.m b/local-cli/generator-ios/templates/app/AppDelegate.m index edaccd8aa..fac3b4fcd 100644 --- a/local-cli/generator-ios/templates/app/AppDelegate.m +++ b/local-cli/generator-ios/templates/app/AppDelegate.m @@ -18,6 +18,7 @@ { NSURL *jsCodeLocation; + [[RCTBundleURLProvider sharedSettings] setDefaults]; jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation