question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Splash screen doesn't disappear

See original GitHub issue

“react-native”: “0.44.0”, “react-native-splash-screen”: “^2.1.0”,

It works fine so far (no updates, nothing new), but splash screen now doesn’t disappear, no error in build. If I remove [Splashscreen show] from the AppDelegate.m file it works, but I want to have some delay. What it could be? It just stopped working, and if I even get back to my previous commits, it still no effect. Could it be problem with my OS or simulator? I don’t yet check on real device.

class AppWithNavigationState extends Component {
  componentDidMount() {
    setTimeout(() => {
      SplashScreen.hide();
    }, 2000)
  }

  render() {
    return (
      <Index
        navigation={addNavigationHelpers({
          dispatch: this.props.dispatch,
          state: this.props.nav
        })}
      />
    )
  }
}

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:5
  • Comments:37

github_iconTop GitHub Comments

15reactions
wincod75commented, May 18, 2018

So, I had the same exact issue, this is how I fixed it. Seems a bit glitchy in my emulator, will test on actual device.

change -> DidMount to -> WillMount

componentWillMount() { SplashScreen.hide(); }

“react”: “^16.3.2”, “react-native”: “^0.55.4”

6reactions
its-artemis-actuallycommented, Mar 14, 2019

I had this issue too, on iOS only. After debugging, I switched to [RNSplashScreen showSplash: inRootView:] instead of show: and it finally worked.

So my didFinishLaunching code in AppDelegate looks like this instead:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [BugsnagReactNative start];
  NSURL *jsCodeLocation;

  #ifdef DEBUG
    jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  #else
    jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
  #endif

  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"MyApp"
                                               initialProperties:nil
                                                   launchOptions:launchOptions];
  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];
  [RNSplashScreen showSplash:@"LaunchScreen" inRootView:rootViewController.view];
  return YES;
}

This assumes you’re using the LaunchScreen.xib file, not launch images.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Splash screen doesn't hide!!! - MSDN - Microsoft
when the app load the splash screen appears that's nice, but it doesn't disappear till i click else where on the main form...
Read more >
Splash screen doesn't stop / doesn't disappear : r/javahelp
Now, I wanted to have a splash screen displayed as long as the app loads. The things in my manifest file seem to...
Read more >
Splash Screen that doesn't go away - Stack Overflow
First of all, the way the splash screen on that page is done, using Thread.Abort, is not the right way to do things....
Read more >
BIOS splash screen doesn't disappear upon startup
I reinstalled Windows 10 fully and I'm able to get on with no problems except the BIOS splash screen doesn't disappear when it's...
Read more >
splash screen does not disappear : WEB-39526 - JetBrains YouTrack
splash screen does not disappear. Duplicates 1. Duplicates 1 issue (0 unresolved). N. IDEA-216203 Splash screen doesn't gets hidden after loading.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found