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

SplashScreen.show() doesn't show on ios

Open Stradler opened this issue 6 years ago • 18 comments
trafficstars

React native version 0.59.1, ios

Trying to use .show() method and it doesn't show anything at all. On ios only.

Stradler avatar Oct 21 '19 12:10 Stradler

Does that error still persist?

brayanL avatar Oct 22 '19 21:10 brayanL

Yes. Using React Native Splash Screen 3.2.0 and on React Native 0.61.4. .show() doesn't work.

CoenWarmer avatar Oct 23 '19 14:10 CoenWarmer

Doesn't work here 0.61.2. Does nothing, no errors. Splash screen 3.2.0. Does not work on ios.

elribonazo avatar Oct 23 '19 17:10 elribonazo

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.

brayanL avatar Oct 25 '19 22:10 brayanL

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();

nppull avatar Oct 29 '19 09:10 nppull

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 avatar Nov 19 '19 15:11 SpencerFaust

@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 :)

elribonazo avatar Nov 19 '19 15:11 elribonazo

Screenshot 2019-11-19 at 16 36 04 My approach, without white thing..

elribonazo avatar Nov 19 '19 15:11 elribonazo

@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.

SpencerFaust avatar Nov 20 '19 15:11 SpencerFaust

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.

luskin avatar Nov 21 '19 02:11 luskin

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.

lrxiang222 avatar Nov 28 '19 03:11 lrxiang222

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?

panda0603 avatar Dec 09 '19 09:12 panda0603

I also experiencing this issue

Rotemy avatar Jan 27 '20 12:01 Rotemy

@crazycodeboy I am also facing this issue.

ShaharyarMaroof avatar Jan 31 '20 09:01 ShaharyarMaroof

Does anyone have a solution? Also facing this issue... @crazycodeboy

mcruz20 avatar Feb 12 '20 15:02 mcruz20

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.

Rotemy avatar Feb 12 '20 16:02 Rotemy

any solution ?

ozanmanav-lime avatar Oct 13 '20 16:10 ozanmanav-lime

Anyone found solution of this issue ?

RamanDEEP225 avatar Oct 06 '22 13:10 RamanDEEP225