Skip to content

Commit

Permalink
Hiding pre-bundled notification when not on dev mode
Browse files Browse the repository at this point in the history
Summary: Notification "loading from pre-bundled file" won't show up anymore on non-dev mode.

Reviewed By: adamjernst

Differential Revision: D8874556

fbshipit-source-id: 8bfa63691beb65d16617409533f7a38dc00dc310
  • Loading branch information
yancouto authored and facebook-github-bot committed Jul 17, 2018
1 parent f5f27b3 commit edf7100
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion React/DevSupport/RCTDevLoadingView.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ - (void)setBridge:(RCTBridge *)bridge
self->_showDate = [NSDate date];
if (!self->_window && !RCTRunningInTestEnvironment()) {
CGSize screenSize = [UIScreen mainScreen].bounds.size;

if (@available(iOS 11.0, *)) {
UIWindow *window = UIApplication.sharedApplication.keyWindow;
self->_window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenSize.width, window.safeAreaInsets.top + 30)];
Expand Down Expand Up @@ -131,6 +131,10 @@ - (void)showWithURL:(NSURL *)URL
UIColor *backgroundColor;
NSString *source;
if (URL.fileURL) {
// If dev mode is not enabled, we don't want to show this kind of notification
#if !RCT_DEV
return;
#endif
color = [UIColor grayColor];
backgroundColor = [UIColor blackColor];
source = @"pre-bundled file";
Expand Down

0 comments on commit edf7100

Please sign in to comment.