Skip to content

Commit

Permalink
Fixed setDefaults not being called in React Native apps, fixed typo
Browse files Browse the repository at this point in the history
Reviewed By: javache

Differential Revision: D3469296

fbshipit-source-id: 032472fede4bfbd051b0f725f35368b22edcc130
  • Loading branch information
nathanajah authored and ide committed Jul 2, 2016
1 parent 8839b6d commit 9f9c6a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion React/Base/RCTBundleURLProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ - (void)setEnableDev:(BOOL)enableDev
[self updateDefaults:@(enableDev) forKey:kRCTEnableDevKey];
}

- (void)setEnableEnableLiveReload:(BOOL)enableLiveReload
- (void)setEnableLiveReload:(BOOL)enableLiveReload
{
[self updateDefaults:@(enableLiveReload) forKey:kRCTEnableLiveReloadKey];
}
Expand Down
1 change: 1 addition & 0 deletions local-cli/generator-ios/templates/app/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
{
NSURL *jsCodeLocation;

[[RCTBundleURLProvider sharedSettings] setDefaults];
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];

RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
Expand Down

3 comments on commit 9f9c6a8

@jsierles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nathanajah Are you working on setting defaults in the constructor, or should I submit a PR? Just don't want to release 0.29 without the defaults being set to development mode.

@nathanajah
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsierles I'm working on it. I have a diff up internally.

@jsierles
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nathanajah awesome, thanks for working on this - it's really a big change for the dev experience!

Please sign in to comment.