summaryrefslogtreecommitdiff
path: root/watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-01-04 04:04:03 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-01-04 04:04:03 +0300
commitbb32e56ca28bb43d5d5afef737f25e4725887725 (patch)
tree519388eb284adeb47744a9ebc334bdf9ff5444a6 /watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift
parentd549f428cbbd54c49a90f92928e670d373c4a0d9 (diff)
move watchos app sources here (which should be rewritten anyway, and usable only in very specific conditions)
Diffstat (limited to 'watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift')
-rw-r--r--watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift33
1 files changed, 33 insertions, 0 deletions
diff --git a/watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift
new file mode 100644
index 0000000..57c4d8d
--- /dev/null
+++ b/watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift
@@ -0,0 +1,33 @@
+//
+// NotificationController.swift
+// InfiniSolar WatchKit Extension
+//
+// Created by Evgeny Zinoviev on 03.08.2021.
+//
+
+import WatchKit
+import SwiftUI
+import UserNotifications
+
+class NotificationController: WKUserNotificationHostingController<NotificationView> {
+
+ override var body: NotificationView {
+ return NotificationView()
+ }
+
+ override func willActivate() {
+ // This method is called when watch view controller is about to be visible to user
+ super.willActivate()
+ }
+
+ override func didDeactivate() {
+ // This method is called when watch view controller is no longer visible
+ super.didDeactivate()
+ }
+
+ override func didReceive(_ notification: UNNotification) {
+ // This method is called when a notification needs to be presented.
+ // Implement it if you use a dynamic notification interface.
+ // Populate your dynamic notification interface as quickly as possible.
+ }
+}