Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
saladestomateoignon opened this issue Dec 4, 2024 · 2 comments

Comments

@saladestomateoignon
Copy link

saladestomateoignon commented Dec 4, 2024

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.

@priyankgandhi0
Copy link

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
Copy link

I tried this #637 (comment) solution.

And it works for me!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants