Revert to requesting notifications on application launch so that the badge can be configured. Issue #2447
This commit is contained in:
parent
c2d39318f9
commit
bad21330f3
|
@ -91,8 +91,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||||
self.unreadCount = AccountManager.shared.unreadCount
|
self.unreadCount = AccountManager.shared.unreadCount
|
||||||
}
|
}
|
||||||
|
|
||||||
UNUserNotificationCenter.current().getNotificationSettings { (settings) in
|
UNUserNotificationCenter.current().requestAuthorization(options:[.badge, .sound, .alert]) { (granted, error) in
|
||||||
if settings.authorizationStatus == .authorized {
|
if granted {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
UIApplication.shared.registerForRemoteNotifications()
|
UIApplication.shared.registerForRemoteNotifications()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue