diff --git a/ios/Klottr/Klottr.xcodeproj/project.pbxproj b/ios/Klottr/Klottr.xcodeproj/project.pbxproj index 19b61b7..7d23f59 100644 --- a/ios/Klottr/Klottr.xcodeproj/project.pbxproj +++ b/ios/Klottr/Klottr.xcodeproj/project.pbxproj @@ -435,7 +435,7 @@ FRAMEWORK_SEARCH_PATHS = ""; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = Klottr/Info.plist; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = NO; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; @@ -466,7 +466,7 @@ FRAMEWORK_SEARCH_PATHS = ""; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = Klottr/Info.plist; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = NO; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; diff --git a/ios/Klottr/Klottr/AppDelegate.swift b/ios/Klottr/Klottr/AppDelegate.swift index 8ba4320..220b605 100644 --- a/ios/Klottr/Klottr/AppDelegate.swift +++ b/ios/Klottr/Klottr/AppDelegate.swift @@ -17,14 +17,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate { 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 - } + PlatformAuthStorage.shared.install(delegate: KeychainStorage()) + return true + } + + func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { diff --git a/ios/Klottr/Klottr/Assets.xcassets/LaunchScreenBackground.colorset/Contents.json b/ios/Klottr/Klottr/Assets.xcassets/LaunchScreenBackground.colorset/Contents.json new file mode 100644 index 0000000..0425637 --- /dev/null +++ b/ios/Klottr/Klottr/Assets.xcassets/LaunchScreenBackground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.000", + "green" : "0.000", + "red" : "0.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/Klottr/Klottr/GoogleAuthIOS.swift b/ios/Klottr/Klottr/GoogleAuthIOS.swift index d48700b..b0b35a9 100644 --- a/ios/Klottr/Klottr/GoogleAuthIOS.swift +++ b/ios/Klottr/Klottr/GoogleAuthIOS.swift @@ -1,5 +1,5 @@ // -// GoogleAuthError.swift +// GoogleAutIOS.swift // Klottr // // Created by Olof Hedman on 2025-09-10. diff --git a/ios/Klottr/Klottr/Info.plist b/ios/Klottr/Klottr/Info.plist index c6458ea..3cc5314 100644 --- a/ios/Klottr/Klottr/Info.plist +++ b/ios/Klottr/Klottr/Info.plist @@ -2,6 +2,8 @@ + CADisableMinimumFrameDurationOnPhone + CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -15,18 +17,53 @@ CFBundleURLTypes + CFBundleTypeRole + Editor + CFBundleURLName + CFBundleURLSchemes - YOUR_REVERSED_IOS_CLIENT_ID + com.googleusercontent.apps.508890452239-66lqrsbphlmqltb6aoe3c0d6dlgtjse8 CFBundleVersion $(CURRENT_PROJECT_VERSION) + + UILaunchScreen + + + + + UIColorNameLaunchScreenBackground + + UIImageRespectsSafeAreaInsets + + GIDClientID 508890452239-66lqrsbphlmqltb6aoe3c0d6dlgtjse8.apps.googleusercontent.com GIDServerClientID 508890452239-5hdoedc9b4rk3k5mmru176lj7f04135r.apps.googleusercontent.com - CADisableMinimumFrameDurationOnPhone + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + diff --git a/ios/Klottr/Klottr/SceneDelegate.swift b/ios/Klottr/Klottr/SceneDelegate.swift new file mode 100644 index 0000000..25da6aa --- /dev/null +++ b/ios/Klottr/Klottr/SceneDelegate.swift @@ -0,0 +1,38 @@ +// +// SceneDelegate.swift +// Klottr +// +// Created by Olof Hedman on 2025-09-17. +// + + +import UIKit +import shared + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + var window: UIWindow? + + func scene(_ scene: UIScene, + willConnectTo session: UISceneSession, + options connectionOptions: UIScene.ConnectionOptions) { + guard let windowScene = scene as? UIWindowScene else { return } + + let root = MainKt.MainViewController() // Compose VC + + let window = UIWindow(windowScene: windowScene) + window.rootViewController = root + self.window = window + window.makeKeyAndVisible() + + // If you need to kick off sign-in at launch, do it here: + DispatchQueue.main.async { + Task { + do { + try await GoogleAuthIOS.signIn(presenting: root) + } catch { + NSLog("Sign In Error: \(error)") + } + } + } + } +}