File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Sources/UserNotificationsClient Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ import Foundation
9
9
import UserNotifications
10
10
11
11
extension UserNotificationClient {
12
-
12
+ private static let notificationDelegate = UserNotificationClient . UserNotificationsDelegate ( )
13
+
13
14
/// Transforms the UNUserNotificationCenter APIs into the async UserNotificationClient interface
14
15
///
15
16
/// ❗️ IMPORTANT ❗️
@@ -20,7 +21,6 @@ extension UserNotificationClient {
20
21
/// before the `didFinishLaunching` method returns. This way the app can react to the push notifications even when opened from a suspended state.
21
22
/// - Returns: Working implementation of the UserNotificationClient
22
23
public static func live( ) -> Self {
23
- let notificationDelegate = UserNotificationClient . UserNotificationsDelegate ( )
24
24
let userNotificationCenter = UNUserNotificationCenter . current ( )
25
25
userNotificationCenter. delegate = notificationDelegate
26
26
let delegate = AsyncStream { continuation in
@@ -52,7 +52,7 @@ extension UserNotificationClient {
52
52
var continuation : AsyncStream < UserNotificationClient . DelegateEvent > . Continuation ?
53
53
54
54
deinit {
55
- print ( " 🍏 DEINIT " )
55
+ print ( " 📬❗️ UserNotificationsDelegate deinitialized. You will no longer receive notification events. " )
56
56
}
57
57
58
58
public func userNotificationCenter(
You can’t perform that action at this time.
0 commit comments