Badge Number Persists When Re-Installing Application

I have been working on adding a badge number count to my app, but have run into a really weird edge case. If I have a badge number on my app, delete the application and then re-install it, the badge number still persists on the app icon until I first open the app. I tried looking to see if there is a lifecycle method that is triggered upon uninstalling an app as well as if there is a specific userDefaults attribute to check in order to clear the badge, but I can't find any clear solutions. Does anyone know of a fix to this issue?

Thanks for the post and sorry for the delay. Upon installation, you can reset the badge to avoid this issue, you can do it every time before checking if the badge needs to be updated.

Can you post how you use the API?

Thanks Albert Pascual
  Worldwide Developer Relations.

Badge Number Persists When Re-Installing Application
 
 
Q