react-native-splash-screen icon indicating copy to clipboard operation
react-native-splash-screen copied to clipboard

[IOS ISSUE]: SplashScreen.show() not working on iOS after react-native layer running

Open saladestomateoignon opened this issue 1 year ago β€’ 5 comments

Hello guys,

I have the following config:

  • react-native: 0.72.12,
  • react-native-splash-screen: 3.3.0.

My AppDelegate.mm looks like this:


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  self.moduleName = @"MyApp";
  self.initialProps = @{};

  BOOL didFinish = [super application:application didFinishLaunchingWithOptions:launchOptions];
  if (didFinish == YES) {
    [RNSplashScreen show];
  }
  return didFinish;
}

After my app booted, I am able to hide by calling SplashScreen.hide() inside a useEffect, like this;

useEffect(() => SplashScreen.hide(), []);

However, if I want to call SplashScreen.show() inside my react-native layer, it simply does not work. The function does nothing. This issue happens ONLY ON IOS (on Android, calling SplashScreen.show() works perfectly).

Have you ever encountered this issue before? Any tips for making it work?

Thanks.

saladestomateoignon avatar Dec 04 '24 15:12 saladestomateoignon

Hi guys,

I have the following configuration:

react-native: 0.76.5 react-native-splash-screen: ^3.3.0

I'm experiencing the same issue. I tried adding [RNSplashScreen show]; to my AppDelegate.mm file, but my app gets stuck on the splash screen.

Does anyone have a solution for this?

priyankgandhi0 avatar Dec 18 '24 05:12 priyankgandhi0

I tried this https://github.com/crazycodeboy/react-native-splash-screen/issues/637#issuecomment-1922781411 solution.

And it works for me!

@saladestomateoignon Try this solution once. It might help you. Thanks!

priyankgandhi0 avatar Dec 18 '24 06:12 priyankgandhi0

πŸš€ Consider Using react-native-splash-view Instead!

Hey there! πŸ‘‹ If you're facing issues with AppDelegate changes in React Native 0.76+, you might want to try [react-native-splash-view] instead!

βœ… Why switch to react-native-splash-view?

  • Fully compatible with React Native 0.76+, including Swift-based AppDelegate.
  • No extra hassleβ€”works smoothly with both Objective-C & Swift projects.
  • Simple integration with iOS storyboard splash screens & Android launch screens.
  • Lightweight & actively maintained for the latest React Native versions.

Check it out & give it a try! πŸš€βœ¨

jagnesh avatar Feb 23 '25 08:02 jagnesh

Hi guys,

I have the following configuration:

react-native: 0.76.5 react-native-splash-screen: ^3.3.0

I'm experiencing the same issue. I tried adding [RNSplashScreen show]; to my AppDelegate.mm file, but my app gets stuck on the splash screen.

Does anyone have a solution for this?

me too

mohamedma872 avatar Feb 25 '25 01:02 mohamedma872

me too ...

react-native: 0.76.5 react-native-splash-screen: ^3.3.0

it works on Android, but not on iOS ...

my app shows no launch screen image ...

ijs1103 avatar Mar 19 '25 05:03 ijs1103