This commit is contained in:
Trey t
2022-02-26 13:19:19 -06:00
parent 8b15c60f0c
commit 4b7c64cbc6
3 changed files with 40 additions and 20 deletions

View File

@@ -45,7 +45,9 @@ class LocalNotification {
let _ = LocalNotification.createNotificationCategory()
let notificationContent = UNMutableNotificationContent()
notificationContent.title = UserDefaultsStore.personalityPackable().randomPushNotificationTitle()
let strings = UserDefaultsStore.personalityPackable().randomPushNotificationStrings()
notificationContent.title = strings.title
notificationContent.body = strings.body
notificationContent.badge = NSNumber(value: 1)
notificationContent.sound = .default
@@ -65,7 +67,8 @@ class LocalNotification {
print(theError.localizedDescription)
}
}
case .failure(_):
case .failure(let error):
print(error)
// Todo: show enable this
break
}