I have an app that will show a notification icon when the user has not been to the app in awhile I can get it to clear when I launch the app but I want it to clear when they swipe clear from their phone notifications. The code I use to clear when I open the app is
UIApplication.shared.applicationIconBadgeNumber = 0
I just started using swift today to help a coworker on their project. If anyone could point me in right direction at least would be appreciated.