diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2023-01-04 04:04:03 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2023-01-04 04:04:03 +0300 |
commit | bb32e56ca28bb43d5d5afef737f25e4725887725 (patch) | |
tree | 519388eb284adeb47744a9ebc334bdf9ff5444a6 /watchos/InfiniSolar/InfiniSolar WatchKit Extension/NotificationController.swift | |
parent | d549f428cbbd54c49a90f92928e670d373c4a0d9 (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.swift | 33 |
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. + } +} |