Hi everyone,
I am using swift to develop an iOS app. The app receives local notification but after opening the app the badge icon does not reset.
So far I have tried the fallowing codes on AppDelegate
func applicationDidBecomeActive( application: UIApplication) {
UIApplication.shared.applicationIconBadgeNumber = 0
}
func applicationWillEnterForeground( application: UIApplication) {
UIApplication.shared.applicationIconBadgeNumber = 0
}
I also tried UIApplication.shared.applicationIconBadgeNumber = -1.
None of the above codes reseted the icon badge number. Please help me to solve this problem.
By the way, right now I am using iOS 14 on my iPhone and Xcode 12.0 beta 2, but even for previous version of iOS and Xcode, the code did not reset the badge!
Selecting any option will automatically load the page