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.

Can't hide the splash screen with calling RNBootSplash.hide

See original GitHub issue

Bug report

Summary

Environment info

react-native info output:

OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 1.50 GB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.9.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.8 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 27.0.3, 28.0.3, 29.0.2, 30.0.2
      System Images: android-19 | Google APIs Intel x86 Atom, android-23 | Google APIs ARM EABI v7a, android-23 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6626763
    Xcode: 12.0/12A7209 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_265 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.2 => 0.63.2 
    react-native-macos: Not Found
  npmGlobalPackages:

Library version: 2.2.6

Steps to reproduce

I would say it is not really a bug, but more like a support/help question. For some reason RNBootSplash.hide() has no effect on iOS. I do see that the logs from within components come out, however, the splash screen is stuck there.

Here’s my AppDelegate.m

… UIStoryboard *sb = [UIStoryboard storyboardWithName:@“BootSplash” bundle:nil]; UIViewController *vc = [sb instantiateInitialViewController]; rootView.loadingView = vc.view; UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; center.delegate = self;

[RNBootSplash initWithStoryboard:@“BootSplash” rootView:rootView]; // <- initialization using the storyboard file name return YES; }

This is my project directory:

image

Setting Launch Screen File as such:

image

Describe what you expected to happen:

I expect the splash screen to eventually hide. But it does not. I call it from my root component’s componentDidMount method (as well as componentDidCatch), however, calling it from anywhere else makes no difference too.

Reproducible sample code

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
zoontekcommented, Oct 6, 2020

@omer-to You could ask for help on platforms like Stack Overflow as this is not an issue with the library.

0reactions
omer-tocommented, Oct 6, 2020

@zoontek Hi again. I tried it. It worked (by the way the animation was very sweet.) So what does this tell me now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

RNBootSplash.hide() does not hide the splash screen on iOS
When I log the package import I truly see that both of the methods ( show and hide ) exist. However, calling it...
Read more >
Rnbootsplash.Hide() Does Not Hide The Splash ... - ADocLib
Set the BootSplash.storyboard as launch screen file: import RNBootSplash from ... calling RNBootSplash.hide pressing Android's EDIT: I can't reproduce it.
Read more >
Splash Screen in React Native (react-native-bootsplash)
In this video, you will see how to make a Splash Screen in React Native Android.And how to change ... Your browser can't...
Read more >
How to add a splash screen in React Native with Splashboot
In the useEffect hook, we are going to hide the splash screen after 3 seconds when the application opens. Our App.js should look...
Read more >
Building a splash screen in React Native - LogRocket Blog
The tutorial will walk you through how to prepare the right image sizes, update the necessary files, and hide the splash screen on...
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