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

[RN71-IOS] - Got a blank screen after setRoot() #7839

Open
1 task done
blood-romantic opened this issue Jan 29, 2024 · 0 comments
Open
1 task done

[RN71-IOS] - Got a blank screen after setRoot() #7839

blood-romantic opened this issue Jan 29, 2024 · 0 comments

Comments

@blood-romantic
Copy link

blood-romantic commented Jan 29, 2024

What happened?

I got a blank screen after SplashScreen.hide(), even if the SignInScreen's render() has been called

What was the expected behaviour?

the react component SignInScreen should be shown without a blank

Was it tested on latest react-native-navigation?

  • I have tested this issue on the latest react-native-navigation release and it still reproduces.

Help us reproduce this issue!

Navigation.registerComponent(appName, () => (props) => <StoreProvider store={store}>
  <App {...props}/>
</StoreProvider>, () => App);

Navigation.registerComponent('app.SignInScreen', () => (props) => <Provider store={store}>
  <SignInScreen {...props}/>
</Provider>, () => SignInScreen);

Navigation.registerComponent('app.ScanningScreen', () => (props) => <Provider store={store}>
  <ScanningScreen {...props}/>
</Provider>, () => ScanningScreen);

Navigation.events().registerAppLaunchedListener(async () => {
  let session = await checkForPreviousSession() || {};  <--  invoke `SplashScreen.hide()` in this function
  Navigation.setRoot({
    root: {
      stack: {
        children: [
          {
            component: {
              name: Object.keys(session).length ? 'app.ScanningScreen' : 'app.SignInScreen' // unique ID registered with Navigation.registerScreen
            },
          },
        ],
        options: {
          statusBar: {
            backgroundColor: COLORS.BLUE,
            style: session ? 'light' : 'dark'
          },
          topBar: { visible: false, height: 0 },
          layout: {
            orientation: ['portrait'], // must be defined in root and within subsequent screens
          },
        },
      },
    },
  });
});


Podfile:

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => true, #flags[:hermes_enabled],
    :fabric_enabled => false, #flags[:fabric_enabled],
    # An absolute path to your application root.
    :flipper_configuration => flipper_config,
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

In what environment did this happen?

React Native Navigation version: 7.37.2
React Native version: 0.71.15
Has Fabric (React Native's new rendering system) enabled: no
Node version: 21.5.0
Device model: iphone13
iOS version: 16.2

@blood-romantic blood-romantic changed the title [IOS] - Got a blank screen after the splash screen hidden [IOS] - Got a blank screen after SplashScreen.hide() Jan 29, 2024
@blood-romantic blood-romantic changed the title [IOS] - Got a blank screen after SplashScreen.hide() [RN71-IOS] - Got a blank screen after SplashScreen.hide() Jan 30, 2024
@blood-romantic blood-romantic changed the title [RN71-IOS] - Got a blank screen after SplashScreen.hide() [RN71-IOS] - Got a blank screen after setRoot() Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant