-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppDelegate.swift
92 lines (69 loc) · 2.79 KB
/
AppDelegate.swift
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//
// AppDelegate.swift
// KatesBackgroundRunner
//
// Created by KatesAndroid on 2021/1/29 PM 7:40
//
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
// 應用程式初始化後
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
// 應用程式初始化
func applicationDidFinishLaunching(_ application: UIApplication) {
<#code#>
}
//即將啟動 Running phase
func applicationDidBecomeActive(_ application: UIApplication) {
<#code#>
}
//進入前景 (使用者使用中)
func applicationWillEnterForeground(_ application: UIApplication) {
<#code#>
}
// 停止啟動
func applicationWillResignActive(_ application: UIApplication) {
<#code#>
}
// 進入背景
func applicationDidEnterBackground(_ application: UIApplication) {
<#code#>
}
// 閒置過久,檢查記憶體與存儲空間,如不足,被迫移除。
func applicationWillTerminate(_ application: UIApplication) {
<#code#>
}
// 記憶體不足提醒
func applicationDidReceiveMemoryWarning(_ application: UIApplication) {
<#code#>
}
// 時間相關
func applicationSignificantTimeChange(_ application: UIApplication) {
<#code#>
}
// 資料相關
func applicationProtectedDataDidBecomeAvailable(_ application: UIApplication) {
<#code#>
}
func applicationProtectedDataWillBecomeUnavailable(_ application: UIApplication) {
<#code#>
}
// Auth
func applicationShouldRequestHealthAuthorization(_ application: UIApplication) {
<#code#>
}
}