diff --git a/ExampleApp/ExampleApp.xcodeproj/project.pbxproj b/ExampleApp/ExampleApp.xcodeproj/project.pbxproj index 185a3820..1b621b07 100644 --- a/ExampleApp/ExampleApp.xcodeproj/project.pbxproj +++ b/ExampleApp/ExampleApp.xcodeproj/project.pbxproj @@ -10,7 +10,6 @@ 8DA476A625399CFA00B79A0A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DA476A525399CFA00B79A0A /* AppDelegate.swift */; }; 8DA476A825399CFA00B79A0A /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DA476A725399CFA00B79A0A /* SceneDelegate.swift */; }; 8DA476AA25399CFA00B79A0A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DA476A925399CFA00B79A0A /* ViewController.swift */; }; - 8DA476AD25399CFA00B79A0A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8DA476AB25399CFA00B79A0A /* Main.storyboard */; }; 8DA476AF25399CFD00B79A0A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8DA476AE25399CFD00B79A0A /* Assets.xcassets */; }; 8DA476B225399CFD00B79A0A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8DA476B025399CFD00B79A0A /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ @@ -20,7 +19,6 @@ 8DA476A525399CFA00B79A0A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 8DA476A725399CFA00B79A0A /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 8DA476A925399CFA00B79A0A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 8DA476AC25399CFA00B79A0A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 8DA476AE25399CFD00B79A0A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 8DA476B125399CFD00B79A0A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 8DA476B325399CFD00B79A0A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -61,7 +59,6 @@ 8DA476A525399CFA00B79A0A /* AppDelegate.swift */, 8DA476A725399CFA00B79A0A /* SceneDelegate.swift */, 8DA476A925399CFA00B79A0A /* ViewController.swift */, - 8DA476AB25399CFA00B79A0A /* Main.storyboard */, 8DA476AE25399CFD00B79A0A /* Assets.xcassets */, 8DA476B025399CFD00B79A0A /* LaunchScreen.storyboard */, 8DA476B325399CFD00B79A0A /* Info.plist */, @@ -128,7 +125,6 @@ files = ( 8DA476B225399CFD00B79A0A /* LaunchScreen.storyboard in Resources */, 8DA476AF25399CFD00B79A0A /* Assets.xcassets in Resources */, - 8DA476AD25399CFA00B79A0A /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -148,14 +144,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - 8DA476AB25399CFA00B79A0A /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 8DA476AC25399CFA00B79A0A /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; 8DA476B025399CFD00B79A0A /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( diff --git a/ExampleApp/ExampleApp/AppDelegate.swift b/ExampleApp/ExampleApp/AppDelegate.swift index f1d6c72c..8ce31153 100644 --- a/ExampleApp/ExampleApp/AppDelegate.swift +++ b/ExampleApp/ExampleApp/AppDelegate.swift @@ -1,34 +1,23 @@ -// -// AppDelegate.swift -// ExampleApp -// -// Created by Mikolaj Piechocki on 16/10/2020. -// - import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { - - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. + func application(_ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { return true } // MARK: UISceneSession Lifecycle - func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { - // Called when a new scene session is being created. - // Use this method to select a configuration to create the new scene with. + func application(_ application: UIApplication, + configurationForConnecting connectingSceneSession: UISceneSession, + options: UIScene.ConnectionOptions) -> UISceneConfiguration { return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } - func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { - // Called when the user discards a scene session. - // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. - // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + func application(_ application: UIApplication, + didDiscardSceneSessions sceneSessions: Set) { } diff --git a/ExampleApp/ExampleApp/Base.lproj/Main.storyboard b/ExampleApp/ExampleApp/Base.lproj/Main.storyboard deleted file mode 100644 index 25a76385..00000000 --- a/ExampleApp/ExampleApp/Base.lproj/Main.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ExampleApp/ExampleApp/Info.plist b/ExampleApp/ExampleApp/Info.plist index 2b43ebcf..0c425fd4 100644 --- a/ExampleApp/ExampleApp/Info.plist +++ b/ExampleApp/ExampleApp/Info.plist @@ -33,8 +33,6 @@ Default Configuration UISceneDelegateClassName $(PRODUCT_MODULE_NAME).SceneDelegate - UISceneStoryboardFile - Main @@ -43,8 +41,6 @@ UILaunchStoryboardName LaunchScreen - UIMainStoryboardFile - Main UIRequiredDeviceCapabilities armv7 diff --git a/ExampleApp/ExampleApp/SceneDelegate.swift b/ExampleApp/ExampleApp/SceneDelegate.swift index 89c63c28..b3767da3 100644 --- a/ExampleApp/ExampleApp/SceneDelegate.swift +++ b/ExampleApp/ExampleApp/SceneDelegate.swift @@ -1,52 +1,15 @@ -// -// SceneDelegate.swift -// ExampleApp -// -// Created by Mikolaj Piechocki on 16/10/2020. -// - import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { 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). - guard let _ = (scene as? UIWindowScene) else { return } - } - - 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 necessarily discarded (see `application:didDiscardSceneSessions` instead). + guard let scene = (scene as? UIWindowScene) else { return } + window = UIWindow(windowScene: scene) + window?.rootViewController = ViewController() + window?.makeKeyAndVisible() } - 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. - } - - } diff --git a/ExampleApp/ExampleApp/ViewController.swift b/ExampleApp/ExampleApp/ViewController.swift index 5254fabd..7d01fda2 100644 --- a/ExampleApp/ExampleApp/ViewController.swift +++ b/ExampleApp/ExampleApp/ViewController.swift @@ -1,19 +1,11 @@ -// -// ViewController.swift -// ExampleApp -// -// Created by Mikolaj Piechocki on 16/10/2020. -// - import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - // Do any additional setup after loading the view. + view.backgroundColor = .blue } - }