[U] Update alarm instantiation

This commit is contained in:
Hykilpikonna
2021-01-17 13:26:47 -05:00
parent 6b89b930fc
commit 650c48ade9
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -31,7 +31,7 @@ class TestingViewController: UIViewController {
//Sends a test notification
@IBAction func sendNotification(_ sender: Any) {
let alarm = Alarm(alarmTime: Date(), text: "Good morning!", wakeMethod: WVM(name: "walking", desc: "Walk"))
let alarm = Alarm(enabled: true, alarmTime: Date(), text: "Good morning!", wakeMethod: WVM(name: "walking", desc: "Walk"))
let content = UNMutableNotificationContent()
@@ -51,7 +51,6 @@ class TestingViewController: UIViewController {
let attachment = try! UNNotificationAttachment(identifier: imageName, url: imageURL, options: .none)
content.attachments = [attachment]
// Readies notification to be sent
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 10, repeats: false)
let request = UNNotificationRequest(identifier: "notification.id.01", content: content, trigger: trigger)