feat: base setup for carplay

This commit is contained in:
Lei Nelissen
2025-05-24 17:41:28 +02:00
parent eb45169060
commit da9653cfe8
12 changed files with 207 additions and 59 deletions

View File

@@ -0,0 +1,17 @@
import CarPlay
class CarSceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate {
func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didConnect interfaceController: CPInterfaceController) {
print("CarPlay: Scene did connect")
print("CarPlay: About to connect to RNCarPlay")
// Dispatch connect to RNCarPlay
RNCarPlay.connect(with: interfaceController, window: templateApplicationScene.carWindow)
print("CarPlay: RNCarPlay.connect called")
}
func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didDisconnect interfaceController: CPInterfaceController) {
print("CarPlay: Scene did disconnect")
// Dispatch disconnect to RNCarPlay
RNCarPlay.disconnect()
}
}