Closed vladamx closed 2 years ago
Just encounter the same problem. I found if you initialize the RN bridge and rootView in didFinishLaunchingWithOptions
, the top level JS code will execute. If your CarPlay app does not heavily depend on the JS logics inside your RN views, you can try initialize the CarPlay app in the top level.
Unfortunately, I need to use scenes api for initialization
I'm also using scenes. Do you initialize your rctRootView
in AppDelegate? If so I believe your top level JS code will execute.
I do but my carplay window is not initialized since phone scene has not run in the case when i am only running carplay window
Can you share your AppDelegate, Phone delegate and Carplay delegate?
Solved it - i was trying to show splash screen in app delegate which breakes the app when launched from carplay screen only and fails silently.
@ouabing Thank you
@ouabing Does your global js app logic run when you are using CarPlay but your phone screen is off?
@vladamx yes, but the component you register to AppRegistry
will not render until you start the app
Timers do not work when screen is off. So, if you are doing any debouncing on JS side, you need to move it to native.
When i start carplay app from a car screen i get the black screen because i haven't started the app on the phone first. If i start the app on the phone first and then in the car - everything works fine. From the architecture standpoint it makes sense since data and controler logic is on JS side.
But for me this is a deal breaker for mixing RN and Carplay.
Is there any workaround this? Do i get this right? @birkir