Files
jellyfin-audio-player/ios/PhoneSceneDelegate.swift
T
Lei Nelissen d323f5a285 feat: CarPlay and Android Auto (#334)
* feat: base carplay

* fix: android auto

* fix: directly reference redux store

* feat: icons instead of buttons

* fix: implement viewfactory so carplay app can start without phone app

* fix: mvoe react-native-auto-play to stable version
2026-02-07 22:26:47 +01:00

33 lines
898 B
Swift

import UIKit
import React_RCTAppDelegate
class PhoneSceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
guard let windowScene = scene as? UIWindowScene else { return }
// Get the AppDelegate to access the React Native setup
guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { return }
// Create the window for this scene
let window = UIWindow(windowScene: windowScene)
// Start React Native if not already started
if let factory = appDelegate.reactNativeFactory {
factory.startReactNative(
withModuleName: "Fintunes",
in: window,
launchOptions: nil
)
}
self.window = window
window.makeKeyAndVisible()
}
}