 
 		DispatchQueue.main.async {
 			self.unreadCount = AccountManager.shared.unreadCount
+		}
+		
+		UNUserNotificationCenter.current().requestAuthorization(options:[.badge]) { (granted, error) in
+			if granted {
+				DispatchQueue.main.async {
+					UIApplication.shared.registerForRemoteNotifications()
+				}
+			}
 		}
 		
 		return true

import UIKit
import RSCore
import Account

var appDelegate: AppDelegate!


		didSet {
			if unreadCount != oldValue {
				postUnreadCountDidChangeNotification()
				UIApplication.shared.applicationIconBadgeNumber = unreadCount
			}
		}
	}
