diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index b9961d0..0f98be0 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 56; objects = { /* Begin PBXBuildFile section */ @@ -13,7 +13,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - A93A953729CC810C00F8E227 /* Material 3 gallery.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Material 3 gallery.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + A93A953729CC810C00F8E227 /* Material 3 gallery.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Material 3 gallery.app"; sourceTree = BUILT_PRODUCTS_DIR; }; A93A953A29CC810C00F8E227 /* iosApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosApp.swift; sourceTree = ""; }; A93A953E29CC810D00F8E227 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; A93A954129CC810D00F8E227 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; @@ -219,6 +219,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = ""; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.2; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -273,6 +275,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = ""; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.2; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -292,26 +296,21 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; ENABLE_PREVIEWS = YES; - FRAMEWORK_SEARCH_PATHS = ( - "${inherited}", - "$(SRCROOT)/../composeApp/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)", - ); + FRAMEWORK_SEARCH_PATHS = ( + "${inherited}", + "$(SRCROOT)/../composeApp/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)", + ); GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "${inherited}", - "-framework", - ComposeApp, - ); + OTHER_LDFLAGS = ( + "${inherited}", + "-framework", + ComposeApp, + ); PRODUCT_BUNDLE_IDENTIFIER = com.github.terrakok.iosApp; PRODUCT_NAME = "Material 3 gallery"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -329,26 +328,21 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; ENABLE_PREVIEWS = YES; - FRAMEWORK_SEARCH_PATHS = ( - "${inherited}", - "$(SRCROOT)/../composeApp/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)", - ); + FRAMEWORK_SEARCH_PATHS = ( + "${inherited}", + "$(SRCROOT)/../composeApp/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)", + ); GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "${inherited}", - "-framework", - ComposeApp, - ); + OTHER_LDFLAGS = ( + "${inherited}", + "-framework", + ComposeApp, + ); PRODUCT_BUNDLE_IDENTIFIER = com.github.terrakok.iosApp; PRODUCT_NAME = "Material 3 gallery"; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/iosApp/iosApp/iosApp.swift b/iosApp/iosApp/iosApp.swift index d8a3657..fbf3ac0 100644 --- a/iosApp/iosApp/iosApp.swift +++ b/iosApp/iosApp/iosApp.swift @@ -1,26 +1,19 @@ import UIKit -import SwiftUI import ComposeApp @main -struct iosApp: App { - var body: some Scene { - WindowGroup { - ContentView() - } - } -} - -struct ContentView: View { - var body: some View { - ComposeView().ignoresSafeArea(.all) - } -} +class AppDelegate: UIResponder, UIApplicationDelegate { + var window: UIWindow? -struct ComposeView: UIViewControllerRepresentable { - func makeUIViewController(context: Context) -> UIViewController { - MainKt.MainViewController() + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + window = UIWindow(frame: UIScreen.main.bounds) + if let window = window { + window.rootViewController = MainKt.MainViewController() + window.makeKeyAndVisible() + } + return true } - - func updateUIViewController(_ uiViewController: UIViewController, context: Context) {} }