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.

React Native 0.60.5 Splashscreen stuck on iOS

See original GitHub issue

Run react-native info in your project and share the content. System: OS: macOS 10.14.6 CPU: (4) x64 Intel® Core™ i5-4278U CPU @ 2.60GHz Memory: 28.46 MB / 8.00 GB Shell: 2.7.1 - /usr/local/bin/fish Binaries: Node: 9.4.0 - /usr/local/bin/node npm: 5.6.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3 Android SDK: API Levels: 22, 25, 26, 27, 28, 29 Build Tools: 23.0.3, 25.0.0, 26.0.2, 27.0.3, 28.0.2, 28.0.3, 29.0.0 System Images: android-22 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.4 AI-183.6156.11.34.5692245 Xcode: 10.3/10G8 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.5 => 0.60.5 npmGlobalPackages: react-native-cli: 2.0.1 react-native-rename: 2.2.

What react-native-splash-screen version are you using? “react-native-splash-screen”: “^3.2.0”,

What platform does your issue occur on? (Android/iOS/Both) iOS only, Android is functioning.

Describe your issue as precisely as possible : 1) Steps to reproduce the issue or to explain in which case you get the issue On opening app and splash screen it gets stuck and do not seem to respond to the SplashScreen.hide(); command in react-native.

2) Interesting logs

Join a screenshot or video of the problem on the simulator or device?

Show us the code you are using? iOS #import “AppDelegate.h” #import <React/RCTBundleURLProvider.h> #import <React/RCTRootView.h> #import “RNSplashScreen.h”

@implementation AppDelegate

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSURL *jsCodeLocation;

    jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@“index” fallbackResource:nil];

    RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@“AppName” 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 show]; return YES; }

@end

React-Native import React, { Component } from ‘react’; import SplashScreen from ‘react-native-splash-screen’

class SignIn extends Component { componentDidMount(){ SplashScreen.hide(); } … }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

6reactions
ShaharyarMaroofcommented, Nov 6, 2019

@gudbrand3 is there any issues with using this lib with async methods? I’ve also go an async method after which I have to hide the splash screen. the console logs don’t indicate any issues, and my async methods also work correctly, but the splash screen doesn’t hide. It also seems specific to iOS only. Any pointers?

1reaction
gudbrand3commented, Aug 19, 2019

Figured it out, it was due to an error with asyncstorage which I didnt see before finding this function

componentDidCatch() { SplashScreen.hide(); }

Guess this causes many to raise issues with splashscreen when not really seeing the actual error. componentDidCatch helped me a lot anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native app stuck on splash screen on device but works ...
It seems that I have found the problem. According to https://facebook.github.io/react-native/docs/running-on-device, when you build and run the app on your ...
Read more >
iOS : React native app stuck on splash screen on device but ...
iOS : React native app stuck on splash screen on device but works in simulator [ Gift : Animated Search Engine : https://bit.ly/AnimSearch...
Read more >
React Native App Stuck On Splash Screen After A Package ...
When your iOS device or simulator stuck on a splash screen. launch an app from Xcode 11 gm seed 2 to my attached...
Read more >
React Native iOS Build in Release configuration freezes on ...
If you are using react-native-splash-screen you maybe forgot to hide it. import SplashScreen from 'react-native-splash-screen' ... SplashScreen.hide();.
Read more >
react-native-screens - npm
Instructions on how to run Fabric Example within this repo can be found in the FabricExample README. Supported platforms. [x] iOS; [x] Android ......
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