   UIApplication.shared.applicationIconBadgeNumber = 0             }         }     }     else {         UIApplication.shared.registerUserNotificationSettings(UIUserNotificationSettings(types: [.sound, .alert], categories: nil))         UIApplication.shared.registerForRemoteNotifications()        