Open harrymash2006 opened 9 months ago
@DanielKuhn @birkir any clue about this?
My understanding is that react native always needs a native bridge to work.
The bridge is usually created in the AppDelegate
but when starting a CarPlay-app without launching the app first, you need to create the bridge in the CarScene
.
I pasted my native code in this issue. For my case it works for starting the app on CarPlay directly.
@DanielKuhn tried same scene files from podverse project but I am still getting the blank screen. I get this message in bundler Running "App" with {"rootTag":1,"initialProps":{}} in terminal but still it shows blank screen on CarPlay
Sorry, I'm at a loss here. My advice would be: Try stripping away all code that is unrelated to startup and add line-by-line debugging.
My understanding is that react native always needs a native bridge to work. The bridge is usually created in the
AppDelegate
but when starting a CarPlay-app without launching the app first, you need to create the bridge in theCarScene
. I pasted my native code in this issue. For my case it works for starting the app on CarPlay directly.
Could someone maybe update de readm, so we can know that a bridge need to be created and how thank you
I got it working following this comment: https://github.com/birkir/react-native-carplay/issues/109#issuecomment-1344820783 (Changed swift code in my project to the one in the pull request)
Now Carplay can be opened without the need of the app. However, I'm facing a different issue with react native navigation that I still need to fix.
After fiddling around with this topic for quite some time now, always in doubt of what's happening under the hood and seeing ever more questions around starting on CarPlay without having the app running on phone, I took the liberty to create (and document!) an example app which runs independently of the phone app and supports launching on CarPlay directly (without having the phone app running) in this PR: https://github.com/birkir/react-native-carplay/pull/158 Patches welcome, feel free to add comments and improvements.
My understanding is that react native always needs a native bridge to work. The bridge is usually created in the
AppDelegate
but when starting a CarPlay-app without launching the app first, you need to create the bridge in theCarScene
. I pasted my native code in this issue. For my case it works for starting the app on CarPlay directly.Could someone maybe update de readm, so we can know that a bridge need to be created and how thank you
@elieT27 I added a description of my understanding of rootViewController, rootView and window creation in the README of my new example app
I am testing this on iOS simulator and also I tested the same on the real CarPlay in a car and the behaviour is same.