react-native-splash-screen: Crash on Splash Screen iOS 12.3.1

Run react-native info in your project and share the content.

Environment:
  OS: macOS 10.14.5
  Node: 10.15.3
  Yarn: 1.16.0
  npm: 6.4.1
  Watchman: 4.9.0
  Xcode: Xcode 10.2.1 Build version 10E1001
  Android Studio: 3.4 AI-183.5429.30.34.5452501

Packages: (wanted => installed)
  react: 16.3.1 => 16.3.1
  react-native: ^0.55.4 => 0.55.4

What react-native-splash-screen version are you using?

"react-native-splash-screen": "^3.0.9",

What platform does your issue occur on? (Android/iOS/Both)

iOS

Describe your issue as precisely as possible :

  1. Steps to reproduce the issue or to explain in which case you get the issue

The issue usually happens when I submit the app for release to TestFlight. At the moment it’s being rejected, cause they only receive a blank screen. I’m unable to reproduce the bug locally.

  1. Interesting logs

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

apple-rejection-blank-splash-screen-bug

Show us the code you are using?

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 6
  • Comments: 16

Commits related to this issue

Most upvoted comments

I can confirm using

@ou2s

Just to confirm. You are saying you fixed the issue by using

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

Instead of

[RNSplashScreen show]

Or did you use something else IE showSplash:inRootView:

I can confirm using : [RNSplashScreen showSplash:@“LaunchScreen” inRootView:rootView]; instead of [RNSplashScreen show]

fixed crash for me.

FYI, I will try to use [RNSplashScreen showSplash:@"LaunchScreen" inRootView:rootView]; instead of [RNSplashScreen show]. You just have to create a View (.xib) via Xcode.

It seems like it’s fixing the problem since it won’t go into the Run Loop that was causing the crash.

EDIT: I confirm that you can workaround this issue by using the showSplash:inRootView: method instead of show (cc @corelmax @chevonc @mcorner @sebiVPS @colaskirschoff )

@ou2s

Just to confirm. You are saying you fixed the issue by using

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

Instead of

[RNSplashScreen show]

Or did you use something else IE showSplash:inRootView:

I’m having the same bug. Everything works fine in debug / release mode on simulator / real device but it fails when the builds comes from Testflight.

What you could do is look at your device crash logs (CMD + SHIFT + 2 in Xcode with your device plugged in). From my logs it seems that l31 of the RNSplashScreen.m is responsible for the crash:

image

This very same line was already discussed because of BAD ACCESS issue a year ago: https://www.bountysource.com/issues/49406480-splashscreen-show-crashes-with-exc_bad_access

image

Apparently the app gets killed by the OS because it takes too much time to load. Maybe the loop does not stop early enough (in my case I call RNSplashScreen.hide() very late in my react-native code). Check this SO issue for more info: https://stackoverflow.com/questions/50186258/app-crash-exception-type-exc-crash-sigkill-termination-reason-namespace-spri.

I’ll try to dig a bit !