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.

iOS app crashes after splash screen is initialized version 3.2.0

See original GitHub issue

react: 16.9.0 react-native: 0.61.5

react-native-splash-screen: 3.2.0

iOs issue

Once the application starts and the splash screen is shown, the application freezes and it is not working then. The splash screen is not hidden and I can go into my application.

Error from Xcode: "Could not load NIB in bundle: 'NSBundle..."

Show splash screen in AppDelegate.m

...
[RNSplashScreen show];
[RNSplashScreen showSplash:@"LaunchScreen" inRootView:rootView];
...

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:12

github_iconTop GitHub Comments

16reactions
AlishahSolankicommented, Aug 31, 2020

@tronginc @rickgrundy @metion @massoprod

The issue is, Xcode project is now updated in 0.63 with UIView nib to UIViewController in LaunchScreen.storyboard which means the function in native has to update and change view loading from nib to view controller… Easy solution replace function showSplash with below given fixed code in file RNSplashScreen.m and set storyboard id see attachment below Now it won’t crash 😃

+ (void)showSplash:(NSString*)splashScreen inRootView:(UIView*)rootView {
    if (!loadingView) {
        UIStoryboard *sb = [UIStoryboard storyboardWithName:splashScreen bundle:nil];
        UIViewController *vc = [sb instantiateViewControllerWithIdentifier:splashScreen];
        
        loadingView = vc.view;//[[[NSBundle mainBundle] loadNibNamed:splashScreen owner:self options:nil] objectAtIndex:0];
        CGRect frame = rootView.frame;
        frame.origin = CGPointMake(0, 0);
        loadingView.frame = frame;
    }
    waiting = false;
    
    [rootView addSubview:loadingView];
}

Screenshot 2020-08-31 at 10 27 58 AM

6reactions
rickgrundycommented, Aug 3, 2020

We hit the same “Could not load NIB in bundle” error after upgrading to react-native 0.63 and switching from LaunchScreen.xib to LaunchScreen.storyboard.

In our case it was solved by switching the “Main Interface” under Targets -> General -> Deployment Info to LaunchScreen.storyboard (you’ve probably already done this for “Launch Screen File”).

Screen Shot 2020-08-03 at 12 45 57 pm
Read more comments on GitHub >

github_iconTop Results From Across the Web

App crashes just after splash scre… | Apple Developer Forums
Our team and I are developing an App that runs perfectly in debug mode, but when we build with the flags "--configuration Release"...
Read more >
React Native app crashes after splash screen - Stack Overflow
The issue with expo-splash-screen module which conflict with react native bootsplash. I have removed it's references from code and work well ...
Read more >
Adobe Air application automatically crashes after splash ...
Coding example for the question Adobe Air application automatically crashes after splash screen on iOS.
Read more >
SplashScreen - Control Options to Display or Hide - Ionic.io
The Splash Screen plugin provides control options for displaying and hiding a ... when initializing plugin after navigating to another URL; Fix crash...
Read more >
react-native-splash-screen - Bountysource
A splash screen for react-native, hide when application loaded ,it works on iOS ... of crashing on open , this crashes on hide...
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