mirror of
https://github.com/nalinbhardwaj/Vespass.git
synced 2026-04-20 03:02:39 -04:00
27 lines
741 B
Swift
27 lines
741 B
Swift
//
|
|
// SceneDelegate.swift
|
|
// Vespass
|
|
//
|
|
// Created by Nalin Bhardwaj on 23/12/22.
|
|
// Copyright © 2022 Vespass. All rights reserved.
|
|
//
|
|
// The scene delegate for iOS.
|
|
|
|
import UIKit
|
|
import SwiftUI
|
|
|
|
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|
|
|
var window: UIWindow?
|
|
|
|
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
|
|
if let windowScene = scene as? UIWindowScene {
|
|
let window = UIWindow(windowScene: windowScene)
|
|
window.rootViewController = UIHostingController(rootView: ContentView().environmentObject(try! Backend()))
|
|
self.window = window
|
|
window.makeKeyAndVisible()
|
|
}
|
|
}
|
|
}
|
|
|