diff --git a/Zockerhoehle.xcodeproj/project.pbxproj b/Zockerhoehle.xcodeproj/project.pbxproj index 59cc7b5..dd0ce9f 100644 --- a/Zockerhoehle.xcodeproj/project.pbxproj +++ b/Zockerhoehle.xcodeproj/project.pbxproj @@ -8,7 +8,6 @@ /* Begin PBXBuildFile section */ B90E03EB238557D900E79643 /* LibraryImport.swift in Sources */ = {isa = PBXBuildFile; fileRef = B90E03EA238557D900E79643 /* LibraryImport.swift */; }; - B93C1B9D21496BFD0014FD6E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B93C1B9C21496BFD0014FD6E /* AppDelegate.swift */; }; B93C1BA421496BFE0014FD6E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B93C1BA321496BFE0014FD6E /* Assets.xcassets */; }; B93D60CE22D88F5700DD390F /* AccessoryDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B93D60CD22D88F5700DD390F /* AccessoryDetailView.swift */; }; B94112DE233A37DD00159AE4 /* DateConversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = B94112DD233A37DD00159AE4 /* DateConversion.swift */; }; @@ -19,6 +18,7 @@ B94CB50322D1352F0029BFAD /* Game+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = B94CB4F722D1352F0029BFAD /* Game+CoreDataClass.swift */; }; B94CB50422D1352F0029BFAD /* Game+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = B94CB4F822D1352F0029BFAD /* Game+CoreDataProperties.swift */; }; B94CB53722D3B3CC0029BFAD /* GameDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B94CB53622D3B3CC0029BFAD /* GameDetailView.swift */; }; + B952648526602CB600BB4324 /* MainView_Zockerhoehle.swift in Sources */ = {isa = PBXBuildFile; fileRef = B952648426602CB600BB4324 /* MainView_Zockerhoehle.swift */; }; B9839983233A086A002F9946 /* Overview.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9839982233A086A002F9946 /* Overview.swift */; }; B98A734D22BAD27D00FB3410 /* Zockerhoehle.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = B98A731722BA9E4600FB3410 /* Zockerhoehle.xcdatamodeld */; }; B98A736022C1738800FB3410 /* CDManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98A735F22C1738800FB3410 /* CDManager.swift */; }; @@ -30,7 +30,6 @@ B98CBBE3265045AC00B1B7AC /* URLExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98CBBE2265045AC00B1B7AC /* URLExtension.swift */; }; B98CBBEB2652B75F00B1B7AC /* ZockerhoehleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98CBBEA2652B75F00B1B7AC /* ZockerhoehleTests.swift */; }; B9A0550122F8C22D0054D9A0 /* GameSeriesAllView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A0550022F8C22D0054D9A0 /* GameSeriesAllView.swift */; }; - B9A0550322F8C2740054D9A0 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A0550222F8C2740054D9A0 /* MainView.swift */; }; B9A0550522F8CB400054D9A0 /* GameSeriesLibraryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A0550422F8CB400054D9A0 /* GameSeriesLibraryView.swift */; }; B9BCCEB92653BDEA005F46D6 /* ICloudManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9BCCEB82653BDEA005F46D6 /* ICloudManager.swift */; }; B9BCF4CA2168ACB600ECBAAC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B9BCF4C92168ACB600ECBAAC /* LaunchScreen.storyboard */; }; @@ -43,7 +42,6 @@ B9ED3DD9265D1E5600FD2D46 /* CDPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9ED3DD8265D1E5600FD2D46 /* CDPreview.swift */; }; B9ED3DDB265D47EC00FD2D46 /* GameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9ED3DDA265D47EB00FD2D46 /* GameView.swift */; }; B9F44ABA22F312E600FC6B29 /* ConsoleLibraryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F44AB922F312E600FC6B29 /* ConsoleLibraryView.swift */; }; - B9F44ABE22F31DEF00FC6B29 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F44ABD22F31DEF00FC6B29 /* SceneDelegate.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -72,7 +70,6 @@ /* Begin PBXFileReference section */ B90E03EA238557D900E79643 /* LibraryImport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryImport.swift; sourceTree = ""; }; B93C1B9921496BFD0014FD6E /* Zockerhoehle.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Zockerhoehle.app; sourceTree = BUILT_PRODUCTS_DIR; }; - B93C1B9C21496BFD0014FD6E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; B93C1BA321496BFE0014FD6E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; B93C1BA821496BFE0014FD6E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B93D60CD22D88F5700DD390F /* AccessoryDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessoryDetailView.swift; sourceTree = ""; }; @@ -86,6 +83,7 @@ B94CB4F922D1352F0029BFAD /* Console+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Console+CoreDataClass.swift"; sourceTree = ""; }; B94CB4FA22D1352F0029BFAD /* Console+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Console+CoreDataProperties.swift"; sourceTree = ""; }; B94CB53622D3B3CC0029BFAD /* GameDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameDetailView.swift; sourceTree = ""; }; + B952648426602CB600BB4324 /* MainView_Zockerhoehle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView_Zockerhoehle.swift; sourceTree = ""; }; B9839982233A086A002F9946 /* Overview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Overview.swift; sourceTree = ""; }; B98A731822BA9E4600FB3410 /* Zockerhoehle.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Zockerhoehle.xcdatamodel; sourceTree = ""; }; B98A735F22C1738800FB3410 /* CDManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDManager.swift; sourceTree = ""; }; @@ -99,7 +97,6 @@ B98CBBEA2652B75F00B1B7AC /* ZockerhoehleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZockerhoehleTests.swift; sourceTree = ""; }; B98CBBEC2652B75F00B1B7AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B9A0550022F8C22D0054D9A0 /* GameSeriesAllView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameSeriesAllView.swift; sourceTree = ""; }; - B9A0550222F8C2740054D9A0 /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; }; B9A0550422F8CB400054D9A0 /* GameSeriesLibraryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameSeriesLibraryView.swift; sourceTree = ""; }; B9BCCEB82653BDEA005F46D6 /* ICloudManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICloudManager.swift; sourceTree = ""; }; B9BCF4C92168ACB600ECBAAC /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; @@ -111,7 +108,6 @@ B9ED3DD8265D1E5600FD2D46 /* CDPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDPreview.swift; sourceTree = ""; }; B9ED3DDA265D47EB00FD2D46 /* GameView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameView.swift; sourceTree = ""; }; B9F44AB922F312E600FC6B29 /* ConsoleLibraryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsoleLibraryView.swift; sourceTree = ""; }; - B9F44ABD22F31DEF00FC6B29 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -155,7 +151,6 @@ B9F44AB922F312E600FC6B29 /* ConsoleLibraryView.swift */, B9E2A07C233B6E4F00EAEB14 /* ConsoleAllView.swift */, B94112DF233A4EF800159AE4 /* GamePickupsView.swift */, - B9A0550222F8C2740054D9A0 /* MainView.swift */, B9EC0986238555BF004BC9AB /* SettingsView.swift */, B9839982233A086A002F9946 /* Overview.swift */, ); @@ -199,9 +194,8 @@ B98A734622BACA9C00FB3410 /* CDModel */, B926F13A214AF21B004D36B7 /* Utils */, B926F136214AE2E3004D36B7 /* Views */, - B93C1B9C21496BFD0014FD6E /* AppDelegate.swift */, - B9F44ABD22F31DEF00FC6B29 /* SceneDelegate.swift */, B9BCF4C92168ACB600ECBAAC /* LaunchScreen.storyboard */, + B952648426602CB600BB4324 /* MainView_Zockerhoehle.swift */, B9ED3DD8265D1E5600FD2D46 /* CDPreview.swift */, B98A735F22C1738800FB3410 /* CDManager.swift */, B9BCCEB82653BDEA005F46D6 /* ICloudManager.swift */, @@ -374,16 +368,14 @@ B94112E0233A4EF800159AE4 /* GamePickupsView.swift in Sources */, B9A0550522F8CB400054D9A0 /* GameSeriesLibraryView.swift in Sources */, B9839983233A086A002F9946 /* Overview.swift in Sources */, - B93C1B9D21496BFD0014FD6E /* AppDelegate.swift in Sources */, B94CB53722D3B3CC0029BFAD /* GameDetailView.swift in Sources */, B94CB50322D1352F0029BFAD /* Game+CoreDataClass.swift in Sources */, B9F44ABA22F312E600FC6B29 /* ConsoleLibraryView.swift in Sources */, - B9F44ABE22F31DEF00FC6B29 /* SceneDelegate.swift in Sources */, - B9A0550322F8C2740054D9A0 /* MainView.swift in Sources */, B98CBBDA264E98DD00B1B7AC /* GameSeries+CoreDataProperties.swift in Sources */, B94CB4FF22D1352F0029BFAD /* Accessory+CoreDataClass.swift in Sources */, B98A734D22BAD27D00FB3410 /* Zockerhoehle.xcdatamodeld in Sources */, B90E03EB238557D900E79643 /* LibraryImport.swift in Sources */, + B952648526602CB600BB4324 /* MainView_Zockerhoehle.swift in Sources */, B98CBBDC264E98DE00B1B7AC /* GameSeries+CoreDataClass.swift in Sources */, B9A0550122F8C22D0054D9A0 /* GameSeriesAllView.swift in Sources */, B94112E4233B597D00159AE4 /* ConsoleEditView.swift in Sources */, diff --git a/Zockerhoehle/AppDelegate.swift b/Zockerhoehle/AppDelegate.swift deleted file mode 100644 index 415d3e4..0000000 --- a/Zockerhoehle/AppDelegate.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// AppDelegate.swift -// Zockerhoehle -// -// Created by Julian-Steffen Müller on 12.09.18. -// Copyright © 2018 Julian-Steffen Müller. All rights reserved. -// - -import UIKit -import CoreData - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - #if targetEnvironment(simulator) - if let documentsPath = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first?.path { - print("Documents Directory: \(documentsPath)") - } - #endif - - print("disFinishLaunchung") - - //ICloudManager.shared.preload_all_data() - - return true - } -} diff --git a/Zockerhoehle/LaunchScreen.storyboard b/Zockerhoehle/LaunchScreen.storyboard index 1d70994..c94d640 100644 --- a/Zockerhoehle/LaunchScreen.storyboard +++ b/Zockerhoehle/LaunchScreen.storyboard @@ -1,11 +1,8 @@ - - - - + + - - + @@ -22,6 +19,7 @@ + @@ -29,7 +27,6 @@ - diff --git a/Zockerhoehle/MainView_Zockerhoehle.swift b/Zockerhoehle/MainView_Zockerhoehle.swift new file mode 100644 index 0000000..6c3c8ca --- /dev/null +++ b/Zockerhoehle/MainView_Zockerhoehle.swift @@ -0,0 +1,38 @@ +// +// Zockerhoehle.swift +// Zockerhoehle +// +// Created by Julian-Steffen Müller on 27.05.21. +// Copyright © 2021 Julian-Steffen Müller. All rights reserved. +// + +import Foundation +import SwiftUI + +@main +struct Zockerhoehle: App { + @Environment(\.scenePhase) var scenePhase + + var body: some Scene { + WindowGroup { + Overview().environment(\.managedObjectContext, CDManager.shared.viewContext) + } + .onChange(of: scenePhase) { newScenePhase in + switch newScenePhase { + case .active: + #if targetEnvironment(simulator) + if let documentsPath = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first?.path { + print("Documents Directory: \(documentsPath)") + } + #endif + + case .inactive: + break + case .background: + break + @unknown default: + break + } + } + } +} diff --git a/Zockerhoehle/SceneDelegate.swift b/Zockerhoehle/SceneDelegate.swift deleted file mode 100644 index 7be9ba8..0000000 --- a/Zockerhoehle/SceneDelegate.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// SceneDelegate.swift -// Zockerhoehle -// -// Created by Julian-Steffen Müller on 01.08.19. -// Copyright © 2019 Julian-Steffen Müller. All rights reserved. -// - -import Foundation -import UIKit -import SwiftUI - -class SceneDelegate: UIResponder, UIWindowSceneDelegate, UIApplicationDelegate { - var window: UIWindow? - - func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { - // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. - // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. - // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). - - // Use a UIHostingController as window root view controller - if let windowScene = scene as? UIWindowScene { - let window = UIWindow(windowScene: windowScene) - - let contentView = MainView() - .environment(\.managedObjectContext, CDManager.shared.viewContext) - - window.rootViewController = UIHostingController(rootView: contentView) - self.window = window - window.makeKeyAndVisible() - } - } - - func sceneDidDisconnect(_ scene: UIScene) { - // Called as the scene is being released by the system. - // This occurs shortly after the scene enters the background, or when its session is discarded. - // Release any resources associated with this scene that can be re-created the next time the scene connects. - // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). - } - - func sceneDidBecomeActive(_ scene: UIScene) { - // Called when the scene has moved from an inactive state to an active state. - // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. - } - - func sceneWillResignActive(_ scene: UIScene) { - // Called when the scene will move from an active state to an inactive state. - // This may occur due to temporary interruptions (ex. an incoming phone call). - } - - func sceneWillEnterForeground(_ scene: UIScene) { - // Called as the scene transitions from the background to the foreground. - // Use this method to undo the changes made on entering the background. - } - - func sceneDidEnterBackground(_ scene: UIScene) { - // Called as the scene transitions from the foreground to the background. - // Use this method to save data, release shared resources, and store enough scene-specific state information - // to restore the scene back to its current state. - - // Save changes in the application's managed object context when the application transitions to the background. - } -} diff --git a/Zockerhoehle/Views/MainView.swift b/Zockerhoehle/Views/MainView.swift deleted file mode 100644 index 508fb97..0000000 --- a/Zockerhoehle/Views/MainView.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// MainView.swift -// Zockerhoehle -// -// Created by Julian-Steffen Müller on 05.08.19. -// Copyright © 2019 Julian-Steffen Müller. All rights reserved. -// - -import SwiftUI - -struct MainView: View { - var body: some View { - Overview() -// TabView { -// ConsolesListView() -// .tabItem({ Text("Konsolen") }) -// .tag(1) -// GameSeriesAllView() -// .tabItem({ Text("Serien") }) -// .tag(2) -// Overview() -// .tabItem({ Text("Überischt") }) -// .tag(0) -// } - - } -}