forked from iAmMccc/SmartCodable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppDelegate.swift
More file actions
51 lines (33 loc) · 1.11 KB
/
AppDelegate.swift
File metadata and controls
51 lines (33 loc) · 1.11 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// AppDelegate.swift
// SmartCodable
//
// Created by Mccc on 08/23/2023.
// Copyright (c) 2023 Mccc. All rights reserved.
//
import UIKit
import SmartCodable
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
SmartSentinel.debugMode = .verbose
SmartSentinel.onLogGenerated { logs in
// print(logs)
// 解析的日志, 可以用来上传服务器
}
initRootViewController()
return true
}
}
extension AppDelegate {
private func initRootViewController() {
window = UIWindow(frame: UIScreen.main.bounds)
window?.backgroundColor = UIColor.white
let vc = ViewController()
let nav = UINavigationController.init(rootViewController: vc)
window?.rootViewController = nav
// window?.rootViewController = vc
window?.makeKeyAndVisible()
}
}