NotificationController.swift 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Software License Agreement (BSD License)
  2. //
  3. // Copyright (c) 2010-2021, Deusty, LLC
  4. // All rights reserved.
  5. //
  6. // Redistribution and use of this software in source and binary forms,
  7. // with or without modification, are permitted provided that the following conditions are met:
  8. //
  9. // * Redistributions of source code must retain the above copyright notice,
  10. // this list of conditions and the following disclaimer.
  11. //
  12. // * Neither the name of Deusty nor the names of its contributors may be used
  13. // to endorse or promote products derived from this software without specific
  14. // prior written permission of Deusty, LLC.
  15. import WatchKit
  16. import Foundation
  17. import UserNotifications
  18. final class NotificationController: WKUserNotificationInterfaceController {
  19. override init() {
  20. // Initialize variables here.
  21. super.init()
  22. // Configure interface objects here.
  23. }
  24. override func willActivate() {
  25. // This method is called when watch view controller is about to be visible to user
  26. super.willActivate()
  27. }
  28. override func didDeactivate() {
  29. // This method is called when watch view controller is no longer visible
  30. super.didDeactivate()
  31. }
  32. override func didReceive(_ notification: UNNotification) {
  33. // This method is called when a notification needs to be presented.
  34. // Implement it if you use a dynamic notification interface.
  35. // Populate your dynamic notification interface as quickly as possible.
  36. }
  37. }