|
5 | 5 | import SwiftUI |
6 | 6 |
|
7 | 7 | class AppDelegate: NSObject, UIApplicationDelegate { |
8 | | - |
9 | | - func application(_ application: UIApplication, |
10 | | - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { |
| 8 | + func application( |
| 9 | + _ application: UIApplication, |
| 10 | + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil |
| 11 | + ) -> Bool { |
11 | 12 | disableAnimations() |
12 | 13 | registerForPushNotifications() |
13 | 14 | UNUserNotificationCenter.current().delegate = NotificationsHandler.shared |
14 | 15 | return true |
15 | 16 | } |
16 | 17 |
|
17 | | - func application(_ application: UIApplication, |
18 | | - configurationForConnecting connectingSceneSession: UISceneSession, |
19 | | - options: UIScene.ConnectionOptions) -> UISceneConfiguration { |
| 18 | + func application( |
| 19 | + _ application: UIApplication, |
| 20 | + configurationForConnecting connectingSceneSession: UISceneSession, |
| 21 | + options: UIScene.ConnectionOptions |
| 22 | + ) -> UISceneConfiguration { |
20 | 23 | let sceneConfig = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role) |
21 | 24 | sceneConfig.delegateClass = SceneDelegate.self |
22 | 25 | return sceneConfig |
@@ -44,13 +47,14 @@ class AppDelegate: NSObject, UIApplicationDelegate { |
44 | 47 | } |
45 | 48 |
|
46 | 49 | func application( |
47 | | - _ application: UIApplication, |
48 | | - didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data |
| 50 | + _ application: UIApplication, |
| 51 | + didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data |
49 | 52 | ) { |
50 | 53 | let tokenParts = deviceToken.map { data in String(format: "%02.2hhx", data) } |
51 | 54 | let token = tokenParts.joined() |
52 | 55 | print("Device Token: \(token)") |
53 | 56 | } |
| 57 | + |
54 | 58 | func application( |
55 | 59 | _ application: UIApplication, |
56 | 60 | didFailToRegisterForRemoteNotificationsWithError error: Error |
|
0 commit comments