From bad21330f3061d68bd31e787a34db6bc813cd764 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Tue, 22 Sep 2020 17:39:29 -0500 Subject: [PATCH] Revert to requesting notifications on application launch so that the badge can be configured. Issue #2447 --- iOS/AppDelegate.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iOS/AppDelegate.swift b/iOS/AppDelegate.swift index b5c7244b8..0dd99bad3 100644 --- a/iOS/AppDelegate.swift +++ b/iOS/AppDelegate.swift @@ -90,9 +90,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD DispatchQueue.main.async { self.unreadCount = AccountManager.shared.unreadCount } - - UNUserNotificationCenter.current().getNotificationSettings { (settings) in - if settings.authorizationStatus == .authorized { + + UNUserNotificationCenter.current().requestAuthorization(options:[.badge, .sound, .alert]) { (granted, error) in + if granted { DispatchQueue.main.async { UIApplication.shared.registerForRemoteNotifications() }