view LazyBearWatchOS Extension/NotificationController.swift @ 429:e4ca9898b79b

Add WatchOS Target
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sat, 19 Jun 2021 16:20:58 +0200
parents
children
line wrap: on
line source

//
//  NotificationController.swift
//  LazyBearWatchOS Extension
//
//  Created by Dennis Concepción Martín on 19/6/21.
//

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.
    }
}