fix scheduling notifications
This commit is contained in:
@@ -29,6 +29,9 @@ class LocalNotification {
|
||||
}
|
||||
|
||||
public class func scheduleReminder(atTime time: Date, withTitle title: String) {
|
||||
LocalNotification.testIfEnabled(completion: { result in
|
||||
switch result{
|
||||
case .success(_):
|
||||
let _ = LocalNotification.createNotificationCategory()
|
||||
|
||||
let notificationContent = UNMutableNotificationContent()
|
||||
@@ -52,6 +55,11 @@ class LocalNotification {
|
||||
print(theError.localizedDescription)
|
||||
}
|
||||
}
|
||||
case .failure(_):
|
||||
// Todo: show enable this
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private class func createNotificationCategory() -> UNNotificationCategory {
|
||||
|
||||
Reference in New Issue
Block a user