diff --git a/React/Base/RCTBundleURLProvider.m b/React/Base/RCTBundleURLProvider.m index 7fe1741f1..105f6a149 100644 --- a/React/Base/RCTBundleURLProvider.m +++ b/React/Base/RCTBundleURLProvider.m @@ -32,18 +32,22 @@ static NSString *ipGuess; } #endif +- (instancetype)init +{ + self = [super init]; + if (self) { + [self setDefaults]; + } + return self; +} + - (NSDictionary *)defaults { - static NSDictionary *defaults; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - defaults = @{ - kRCTEnableLiveReloadKey: @NO, - kRCTEnableDevKey: @YES, - kRCTEnableMinificationKey: @NO, - }; - }); - return defaults; + return @{ + kRCTEnableLiveReloadKey: @NO, + kRCTEnableDevKey: @YES, + kRCTEnableMinificationKey: @NO, + }; } - (void)settingsUpdated diff --git a/local-cli/generator-ios/templates/app/AppDelegate.m b/local-cli/generator-ios/templates/app/AppDelegate.m index fac3b4fcd..edaccd8aa 100644 --- a/local-cli/generator-ios/templates/app/AppDelegate.m +++ b/local-cli/generator-ios/templates/app/AppDelegate.m @@ -18,7 +18,6 @@ { NSURL *jsCodeLocation; - [[RCTBundleURLProvider sharedSettings] setDefaults]; jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation