[U] Update alarm instantiation
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user