MastoSearch/MastoSearchMobile/AppDelegate.swift

33 lines
971 B
Swift

//
// AppDelegate.swift
// MastoSearchMobile
//
// Created by Shadowfacts on 7/3/22.
//
import UIKit
import MastoSearchCore
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
DatabaseController.shared.initialize()
return true
}
func applicationWillTerminate(_ application: UIApplication) {
DatabaseController.shared.close()
}
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<UISceneSession>) {
}
}