Main UI in Shared (KlottrRoot.kt) that also work on iOS

This commit is contained in:
Olof Hedman
2025-09-16 16:33:52 +02:00
parent d0046646fc
commit 2eed4d56ac
6 changed files with 394 additions and 11 deletions

View File

@@ -11,10 +11,18 @@ import UIKit
import GoogleSignIn
import shared
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
PlatformAuthStorage.shared.install(delegate: KeychainStorage())
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = MainKt.MainViewController() // adjust pkg
window?.makeKeyAndVisible()
return true
}
func application(_ app: UIApplication,

View File

@@ -27,5 +27,6 @@
<string>508890452239-66lqrsbphlmqltb6aoe3c0d6dlgtjse8.apps.googleusercontent.com</string>
<key>GIDServerClientID</key>
<string>508890452239-5hdoedc9b4rk3k5mmru176lj7f04135r.apps.googleusercontent.com</string>
<key>CADisableMinimumFrameDurationOnPhone</key><true/>
</dict>
</plist>

View File

@@ -7,14 +7,14 @@
import SwiftUI
@main
struct KlottrApp: App {
// Make AppDelegate participate in the SwiftUI lifecycle
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
//@main
//struct KlottrApp: App {
// // Make AppDelegate participate in the SwiftUI lifecycle
// @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
//
// var body: some Scene {
// WindowGroup {
// ContentView()
// }
// }
//}