2022-01-02 20:41:04 +01:00
|
|
|
import Foundation
|
|
|
|
import UIKit
|
|
|
|
|
|
|
|
final class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
|
|
var orientationLock = UIInterfaceOrientationMask.all
|
|
|
|
|
|
|
|
private(set) static var instance: AppDelegate!
|
|
|
|
|
|
|
|
func application(_: UIApplication, supportedInterfaceOrientationsFor _: UIWindow?) -> UIInterfaceOrientationMask {
|
|
|
|
orientationLock
|
|
|
|
}
|
|
|
|
|
|
|
|
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { // swiftlint:disable:this discouraged_optional_collection
|
2022-05-20 21:53:17 +02:00
|
|
|
Self.instance = self
|
2022-06-22 00:18:16 +02:00
|
|
|
#if os(iOS)
|
|
|
|
UIViewController.swizzleHomeIndicatorProperty()
|
2022-06-28 21:11:28 +02:00
|
|
|
|
2022-07-10 00:29:13 +02:00
|
|
|
OrientationTracker.shared.startDeviceOrientationTracking()
|
2022-06-22 00:18:16 +02:00
|
|
|
#endif
|
2022-01-02 20:41:04 +01:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|