forked from quoid/userscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSceneDelegate.swift
More file actions
30 lines (23 loc) · 791 Bytes
/
Copy pathSceneDelegate.swift
File metadata and controls
30 lines (23 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
// SceneDelegate.swift
// Userscripts-iOS
//
// Created by Justin Wasack on 10/3/21.
// Copyright © 2021 Justin Wasack. All rights reserved.
//
import UIKit
// https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let _ = (scene as? UIWindowScene) else { return }
}
func sceneWillResignActive(_ scene: UIScene) {
USLogStoreToFile()
}
func sceneWillEnterForeground(_ scene: UIScene) {
if let viewController = window?.rootViewController as? ViewController {
viewController.updateEnableLoggerState()
}
}
}