Is there a way to clear the remote notification from the notification banner when swiping down from the top of the iPhone screen. I tried setting the badge number to zero:
You need to set the IconBadgeNumber to 0 and cancel the current notifications. I never did in swift but I think the code for it would be as bellow:
application.applicationIconBadgeNumber = 0
application.cancelAllLocalNotifications()
Swift 5
UNUserNotificationCenter.current().removeAllDeliveredNotifications()