react-native-splash-screen
react-native-splash-screen copied to clipboard
SplashScreen.show() doesn't show on ios
React native version 0.59.1, ios
Trying to use .show() method and it doesn't show anything at all. On ios only.
Does that error still persist?
Yes. Using React Native Splash Screen 3.2.0 and on React Native 0.61.4. .show() doesn't work.
Doesn't work here 0.61.2. Does nothing, no errors. Splash screen 3.2.0. Does not work on ios.
I follow this article Add a splash screen to a React Native app and works like a charm. README file on this library should be updated.
my app delegate is swift, RN 0.59.10, ios 13.1, macos catalina
zzz-Bridging-Header.h
#import "RNSplashScreen.h"
AppDelegate.swift
RNSplashScreen.show();
I'm also experiencing this issue. Using Xcode 11.2.1, RN 59.9, SplashScreen 3.2.0.
The initial loading screen appears when loading the app but calling SplashScreen.show() programatically within the app prior to restarting via codePush.restartApp does nothing; nothing but a blank white screen appears while RN reloads. I did some research and haven't found a fix, although it looks like this issue has been known for a while.
If I've missed something or someone knows a fix I'd love a heads up.
@SpencerFaust I had exactly the same issue, what was your workarround? Mine making sure the updates installed inmediatly not on next restart + checking if there's an update or not + hiding the splash screen after. But i got another app implemented 1.5 years ago which was using the show method... I'm just curious about your solution :)
My approach, without white thing..
@elribonazo We don't have a fix, I was just chiming in that I'm experiencing the issue as well. We took a brief look but our use case is so small we're not going to put the time into it. It would be really nice to have.
To clarify: our app has several points where the user is already in the app and using it at which point we use codePush.restartApp to reload the entire app. Android's splash screen works when calling SplashScreen.show() prior to the codePush restart, iOS does not.
We got the same issue over here as well, RN 0.61.4 on iOS 13 - SplashScreen.show() does nothing for us and results in the white screen flash mentioned above. As others have stated this is not a big enough issue for us to pour time into so hopefully someone out there with more time can find a solution.
I also encountered this problem. Use Xcode 11.2.1, RN 0.59.10, SplashScreen 3.2.0. The initial loading screen appears when the application loads, and the screen goes blank when reloading.
I am experiencing the exact same issue on ios. Initial splash screen works fine, but SplashScreen.show() method doesn't work on ios. Android works fine. Any updates on this?
I also experiencing this issue
@crazycodeboy I am also facing this issue.
Does anyone have a solution? Also facing this issue... @crazycodeboy
Does anyone have a solution? Also facing this issue... @crazycodeboy
I'm sorry to be the one to tell you, but after investigating a bit, this has never and will never work.
the show(); method is connected to this method
RCT_EXPORT_METHOD(show) {
[RNSplashScreen show];
}
and that method is just calling this method:
+ (void)show {
if (!addedJsLoadErrorObserver) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jsLoadError:) name:RCTJavaScriptDidFailToLoadNotification object:nil];
addedJsLoadErrorObserver = true;
}
while (waiting) {
NSDate* later = [NSDate dateWithTimeIntervalSinceNow:0.1];
[[NSRunLoop mainRunLoop] runUntilDate:later];
}
}
which just extending the time the native splash screen is showing by using a while loop and causing the thread to block callbacks (see my issue #459 )
This library is dead I believe.
You can fix your problem by adding your own RTC method and just do what I did in my issue.
any solution ?
Anyone found solution of this issue ?