-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
RN 0.71 Splashscreen.show() not working on iOS #610
Comments
Duplicate of #606 |
I don't think it's the same topic.I tried the code block there, but splashscreen.show() didn't work after RNrestart.Restart(). |
Change the code in your AppDelegate.mm to be
|
Thank you for your help, but this solution did not work. |
If it's blocking your development, I highly recommend switching to this library https://www.npmjs.com/package/react-native-bootsplash - It's way more maintained and I am planing to move to it as well @Engraulis61 |
+1 same issue |
@a-tokyo Your solution seemed to help in my case thanks! The docs for the package probably should just be updated to reflect this, but the best bet considering this package is largely unmaintained at this point is to move to bootsplash like you suggest. |
this solution still causes white flashes Follow guide from the maintainers facebook/react-native#35937 (comment) At AppDelegate.mm, override
ive tested in ios 16 and ios 17 seems working fine now |
Based on crazycodeboy/react-native-splash-screen#610 (comment) It seems to work now when no metro server gets found, but the problem is that it does not work in any other case...
Worked beautifully |
Hi @arnoldc, I tried your solution, and it worked, but I encountered another issue. My splash screen has some custom customizations (such as showing the app version at the bottom). However, when I forced the app to restart, the splash screen appeared, but the customized UI did not show, it just shows app icon in center of the screen. |
@Engraulis61 Hi. I’m facing the exact same issue as you. Specifically, SplashScreen.show() is not working on iOS. If we use react-native-bootsplash, there is no .show() method. How did you handle this issue? Could you share your solution with me? |
What
react-native-splash-screen
version are you using?3.3.0
What platform does your issue occur on? (Android/iOS/Both)
iOS
i just want to show user splash screen after rnrestart.restart() command. but Splashscreen.show() method not working on iOS.
In older versions of React, I could solve this problem by adding code to the AppDelegate.mm file. However, since the AppDelegate.mm file has changed, I am unable to display the splash screen after using the RNrestart.Restart() command.
I used to use these codes in old versions of React Native:
RCTRootView *rootView = RCTAppSetupDefaultRootView(bridge, @"appname", nil);
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil];
UIViewController vc = [sb instantiateInitialViewController];
UIView launchScreenView = vc.view;
launchScreenView.frame = self.window.bounds;
RCTRootView.loadingView = launchScreenView;
Is there anyone who can help with a solution for this problem?
The text was updated successfully, but these errors were encountered: