Badge UIApplication

good day, I need help with see below

when the notification is OK, the badge is added. If the application is opened the badge disappears. that is right. when a new notification arrives badge it is not 1 but the value is previous value +1.

I need the value to be 0 when the application is opened.

it's about resetting the badge value.

I don't know if this code Is correct for my functionality. func applicationDidBecomeActive (_ application: UIApplication) { UIApplication.shared.applicationIconBadgeNumber = 0 }

the value does not reset but only disappears.

If I understand your question correctly, AFAIK, a badge with zero value is considered cleared, hence disappear.

Yo get it with 0, you should design your own badge.

I need to achieve that if I set it to 0 so it will be 0. he just disappears and when the new notification comes so the badge is equal to 2 no 1

Badge UIApplication
 
 
Q