add logging

This commit is contained in:
Trey t
2022-03-13 20:06:26 -05:00
parent 8d3e9a7c6e
commit f3542117a7
14 changed files with 93 additions and 5 deletions

View File

@@ -21,8 +21,10 @@ class LocalNotification {
public class func testIfEnabled(completion: @escaping (Result<Bool, Error>) -> Void) {
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { success, error in
if success {
EventLogger.log(event: "local_notification_enabled")
completion(.success(true))
} else if let error = error {
EventLogger.log(event: "local_notification_disabled")
completion(.failure(error))
}
}