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

SplashScreen.show() doesn't show on ios #439

Open
Stradler opened this issue Oct 21, 2019 · 18 comments
Open

SplashScreen.show() doesn't show on ios #439

Stradler opened this issue Oct 21, 2019 · 18 comments

Comments

@Stradler
Copy link

Stradler commented Oct 21, 2019

React native version 0.59.1, ios

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

@brayanL
Copy link

brayanL commented Oct 22, 2019

Does that error still persist?

@CoenWarmer
Copy link

CoenWarmer commented Oct 23, 2019

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

@elribonazo
Copy link

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

@brayanL
Copy link

brayanL commented Oct 25, 2019

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.

@nppull
Copy link

nppull commented Oct 29, 2019

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

@SpencerFaust
Copy link

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.

@elribonazo
Copy link

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

Screenshot 2019-11-19 at 16 36 04

My approach, without white thing..

@SpencerFaust
Copy link

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

@luskin
Copy link

luskin commented Nov 21, 2019

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.

@lrxiang222
Copy link

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.

@panda0603
Copy link

panda0603 commented Dec 9, 2019

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?

@Rotemy
Copy link

Rotemy commented Jan 27, 2020

I also experiencing this issue

@ShaharyarMaroof
Copy link

ShaharyarMaroof commented Jan 31, 2020

@crazycodeboy I am also facing this issue.

@mcruz20
Copy link

mcruz20 commented Feb 12, 2020

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

@Rotemy
Copy link

Rotemy commented Feb 12, 2020

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.

@ozanmanav-lime
Copy link

any solution ?

@RamanDEEP225
Copy link

RamanDEEP225 commented Oct 6, 2022

Anyone found solution of this issue ?

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