teachers-assistant

[RADIOACTIVE] oh boy did i make bad apps back in the day
git clone git://git.figbert.com/teachers-assistant.git
Log | Files | Refs

commit 348e9ebd625797d9c4f30e9ea48ce24d4542867e
parent ceabaff16c95b9fd37947063fabbd3b042a6eb79
Author: Naomi Welner <naomi@Naomis-MacBook-Air.local>
Date:   Tue, 12 Mar 2019 19:43:32 -0700

Adding existing files

Diffstat:
MTeachers' Assistant/AppDelegate.swift | 9+++++++--
MTeachersAssistant.xcworkspace/xcuserdata/naomi.xcuserdatad/UserInterfaceState.xcuserstate | 0
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Teachers' Assistant/AppDelegate.swift b/Teachers' Assistant/AppDelegate.swift @@ -10,10 +10,13 @@ import UIKit import UserNotifications @UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { +class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate { var window: UIWindow? + func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { + completionHandler([.alert, .badge, .sound]) + } func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { /* PERMISSION REQUESTS START */ @@ -25,7 +28,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate { welcomeNotification.body = "Enjoy the app!" welcomeNotification.sound = UNNotificationSound.default() let welcomeTrigger = UNTimeIntervalNotificationTrigger(timeInterval: 1, repeats: false) - _ = UNNotificationRequest(identifier: "welcomePing", content: welcomeNotification, trigger: welcomeTrigger) + let welcomePing = UNNotificationRequest(identifier: "welcomePing", content: welcomeNotification, trigger: welcomeTrigger) + UNUserNotificationCenter.current().add(welcomePing, withCompletionHandler: nil) + UNUserNotificationCenter.current().delegate = self /* PERMISSION REQUESTS END */ } diff --git a/TeachersAssistant.xcworkspace/xcuserdata/naomi.xcuserdatad/UserInterfaceState.xcuserstate b/TeachersAssistant.xcworkspace/xcuserdata/naomi.xcuserdatad/UserInterfaceState.xcuserstate Binary files differ.