how to hide topbar black prompt box: "loading from x.x.x.x:8081" when loading js code #2627

Closed
fsp1990 opened this Issue Sep 10, 2015 · 13 comments

Comments

Projects
None yet
10 participants
@fsp1990

fsp1990 commented Sep 10, 2015

same as title.

@brentvatne

This comment has been minimized.

Show comment
Hide comment
@brentvatne

brentvatne Sep 10, 2015

Collaborator

This doesn't show up if development mode is disabled. Do you need to disable it in a development build?

Collaborator

brentvatne commented Sep 10, 2015

This doesn't show up if development mode is disabled. Do you need to disable it in a development build?

@brentvatne

This comment has been minimized.

Show comment
Hide comment

@brentvatne brentvatne closed this Sep 10, 2015

@eyaleizenberg

This comment has been minimized.

Show comment
Hide comment
@eyaleizenberg

eyaleizenberg Sep 17, 2015

Contributor

Hi @brentvatne can you be more specific and tell me where this line should be added?

Thanks!

Contributor

eyaleizenberg commented Sep 17, 2015

Hi @brentvatne can you be more specific and tell me where this line should be added?

Thanks!

@brentvatne

This comment has been minimized.

Show comment
Hide comment
@brentvatne

brentvatne Sep 19, 2015

Collaborator

@eyaleizenberg - you can add it to your AppDelegate.m, just make sure you import the header file

Collaborator

brentvatne commented Sep 19, 2015

@eyaleizenberg - you can add it to your AppDelegate.m, just make sure you import the header file

@eyaleizenberg

This comment has been minimized.

Show comment
Hide comment
@eyaleizenberg

eyaleizenberg Sep 20, 2015

Contributor

@brentvatne Sorry for being stupid, I don't know much about obj-c... ;)

So I need to add

#import "RCTDevLoadingView.h" to the beginning of my AppDelegate.m file right?

But where exactly do I add [RCTDevLoadingView setEnabled:NO];?

Thanks.

Contributor

eyaleizenberg commented Sep 20, 2015

@brentvatne Sorry for being stupid, I don't know much about obj-c... ;)

So I need to add

#import "RCTDevLoadingView.h" to the beginning of my AppDelegate.m file right?

But where exactly do I add [RCTDevLoadingView setEnabled:NO];?

Thanks.

@ide

This comment has been minimized.

Show comment
Hide comment
@ide

ide Sep 20, 2015

Collaborator

Put the call in application:didFinishLaunchingWithOptions:.

Stack Overflow / Google is a much more appropriate place for general questions about programming. We say in the Readme:

The GitHub issues are intended for bug reports and feature requests. For help and questions with using React Native please make use of the resources listed in the Getting Help section. There are limited resources available for handling issues and by keeping the list of open issues lean we can respond in a timely manner.

Collaborator

ide commented Sep 20, 2015

Put the call in application:didFinishLaunchingWithOptions:.

Stack Overflow / Google is a much more appropriate place for general questions about programming. We say in the Readme:

The GitHub issues are intended for bug reports and feature requests. For help and questions with using React Native please make use of the resources listed in the Getting Help section. There are limited resources available for handling issues and by keeping the list of open issues lean we can respond in a timely manner.

@eyaleizenberg

This comment has been minimized.

Show comment
Hide comment
@eyaleizenberg

eyaleizenberg Sep 20, 2015

Contributor

@ide Yeah I know about not posting questions here but someone already opened this issue, so you know... ;)

Anyway, I tried what you said and it's not working:

#import "AppDelegate.h"

#import "RCTRootView.h"

#import "RCTPushNotificationManager.h"

#import "RCTDevLoadingView.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [RCTDevLoadingView setEnabled:NO];
  NSURL *jsCodeLocation;
.....

In xcode I get: "No known class method for selector 'setEnabled:'"

Contributor

eyaleizenberg commented Sep 20, 2015

@ide Yeah I know about not posting questions here but someone already opened this issue, so you know... ;)

Anyway, I tried what you said and it's not working:

#import "AppDelegate.h"

#import "RCTRootView.h"

#import "RCTPushNotificationManager.h"

#import "RCTDevLoadingView.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [RCTDevLoadingView setEnabled:NO];
  NSURL *jsCodeLocation;
.....

In xcode I get: "No known class method for selector 'setEnabled:'"

@nfranzmeier

This comment has been minimized.

Show comment
Hide comment
@nfranzmeier

nfranzmeier Oct 2, 2015

Apparently those files have been updated to support that feature (hiding the black line notification) recently. You can just update those 2 files
RCTDevLoadingView.m
RCTDevLoadingView.h

from https://github.com/facebook/react-native/blob/1c4be5e1f20830cc0e40c0a0860b5270bf0500f8/React/Modules/RCTDevLoadingView.m

as brentvatne suggested.

Then it works with the code like eyaleizenberg wrote

Apparently those files have been updated to support that feature (hiding the black line notification) recently. You can just update those 2 files
RCTDevLoadingView.m
RCTDevLoadingView.h

from https://github.com/facebook/react-native/blob/1c4be5e1f20830cc0e40c0a0860b5270bf0500f8/React/Modules/RCTDevLoadingView.m

as brentvatne suggested.

Then it works with the code like eyaleizenberg wrote

@lvyile

This comment has been minimized.

Show comment
Hide comment
@lvyile

lvyile Oct 12, 2015

Contributor

RCTDevLoadingView.setEnabled(false)
// must call before Root view init
RCTRootView.init(xxx)
thx..

Contributor

lvyile commented Oct 12, 2015

RCTDevLoadingView.setEnabled(false)
// must call before Root view init
RCTRootView.init(xxx)
thx..

@petermason

This comment has been minimized.

Show comment
Hide comment
@petermason

petermason Oct 12, 2015

@nfranzmeier need to do this. Setting dev mode to false with still show black line notification otherwise

@nfranzmeier need to do this. Setting dev mode to false with still show black line notification otherwise

@pmadruga

This comment has been minimized.

Show comment
Hide comment
@pmadruga

pmadruga Oct 28, 2015

Contributor

Same as @petermason here. dev mode to false didn't make a difference.

Contributor

pmadruga commented Oct 28, 2015

Same as @petermason here. dev mode to false didn't make a difference.

@alireza-nouri

This comment has been minimized.

Show comment
Hide comment
@alireza-nouri

alireza-nouri Jan 13, 2016

you should first put #import "RCTDevLoadingView.h" under the #import "RCTRootView.h" then put
[RCTDevLoadingView setEnabled:NO] under the NSURL *jsCodeLocation; on AppDelegate.m

you should first put #import "RCTDevLoadingView.h" under the #import "RCTRootView.h" then put
[RCTDevLoadingView setEnabled:NO] under the NSURL *jsCodeLocation; on AppDelegate.m

@rclai

This comment has been minimized.

Show comment
Hide comment
@rclai

rclai Jan 30, 2017

Contributor

@brentvatne Since the upgrade to 0.40.0, doing #import "RCTDevLoadingView.h" doesn't work, and neither does #import <React/RCTDevLoadingView.h>. How do we access RCTDevLoadingView in the AppDelegate.m?

Contributor

rclai commented Jan 30, 2017

@brentvatne Since the upgrade to 0.40.0, doing #import "RCTDevLoadingView.h" doesn't work, and neither does #import <React/RCTDevLoadingView.h>. How do we access RCTDevLoadingView in the AppDelegate.m?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment