add logging
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user