avishayil / react-native-restart

React Native Package With One Purpose: To Restart Your React Native Project
MIT License
937 stars 149 forks source link

The white screen that appears after using RNRestart.Restart() #238

Open Engraulis61 opened 1 year ago

Engraulis61 commented 1 year ago

I want to show a splash screen to the user after calling rnrestart.restart().

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?

UmerHayyat54 commented 1 year ago

i am also facing same issue

faizanviwell commented 1 year ago

Facing the same issue

Melekhin commented 1 year ago

and me, too.

Any of the solutions through the use of react-native-splash-screen or react-native-bootsplash modules? or custom splash screen..

mehthabux commented 1 year ago

any solution for this ?

hfarhanahmed commented 10 months ago

I am facing same issue

ansmlc commented 6 months ago

Same issue :(

Asad520 commented 1 month ago

Facing the same issue. Did anybody find a solution for this?

ChadyAyoub4 commented 1 week ago

This issue is not from the package, You can set the root view background color to your app by adding this code

in your appdelegate.mm file and you will get the desired color