Skip to content

showOverlay creates a scene-less UIWindow, so overlays never appear under UIScene lifecycle #8345

Description

@sh-bnsl

What happened?

On iOS, Navigation.showOverlay() creates a new RNNOverlayWindow with initWithFrame: and never assigns a UIWindowScene.

With a scene-based app lifecycle, that window is not added to the scene, so the overlay never appears. JS still mounts and runs (the overlay VC is created and rendered), which makes this look like a hang: native/RNN splash dismisses, overlay logic is running, but the screen stays on RNNSplashScreenViewController / the current root.

Navigation.setRoot() is not affected, because it attaches the layout to the existing _mainWindow that the host already bound to the scene.

This is easy to miss on older iOS if the app still used the AppDelegate window path. It becomes a hard break once the app adopts UIWindowScene (mandatory on iOS 26+).

What was the expected behaviour?

showOverlay shows the overlay above the current root on the same UIWindowScene.

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!

  1. Use UIScene lifecycle (UIApplicationSceneManifest + UIWindowSceneDelegate).
  2. Create the window with initWithWindowScene: and pass it to RNN (delegate.window set before bootstrap).
  3. On Navigation.events().registerAppLaunchedListener, do not setRoot. Call:
Navigation.showOverlay({
  component: {
    name: 'example.OverlayScreen',
  },
});
  1. OverlayScreen mounts (componentDidMount / useEffect runs) but nothing is visible. The scene window is still RNNSplashScreenViewController.

Control: the same screen shown via setRoot appears correctly:

Navigation.setRoot({
  root: {
    stack: {
      children: [{ component: { name: 'example.OverlayScreen' } }],
    },
  },
});

In what environment did this happen?

  • react-native-navigation: 8.8.9
  • react-native: 0.87 (New Architecture / Fabric, bridgeless)
  • iOS: 26 / 27 (also repros conceptually on iOS 13+ with UIScene)
  • Host: RNNAppDelegate + custom UIWindowSceneDelegate
  • Platform: iOS only

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions