discussions-and-proposals icon indicating copy to clipboard operation
discussions-and-proposals copied to clipboard

[iOS] Decouple `rootView` from `rootViewController` and `window`

Open DanielKuhn opened this issue 5 months ago • 0 comments

Over in the tight-knit react-native-carplay-community we keep struggling with changing the iOS initialization on every new release of React Native.

This is due to React Native generally assuming phone/tablet usage and therefore coupling the creation of rootView with rootViewController/window, which are not needed when launching an app on a CarPlay device directly (without the phone app running) via a CPTemplateApplicationScene which has its own carWindow.

Could you maybe try to keep these separated in the future? It should really be as simple as splitting the factory's startReactNative into a call to create the rootView (at best inside a public method 😉) and an optional call to create a rootViewController, attaching the rootView and assigning it to the window, no?

DanielKuhn avatar Jun 13 '25 10:06 DanielKuhn