This is the expected behavior, the icon number remains for a short period after removal, for example, in case of immediate reinstallation.
Of course, you can invalidate the icon number after each application launch in the application:didFinishLaunchingWithOptions: method, but I think that this is not so because you want the icon number not to be displayed immediately after installing the application and not yet launching it. In this case, just wait after uninstalling the application, and the cache code will be cleared by iOS, and then install the application again. Unfortunately, without jailbreaking a device, there is no way to manually control the behavior of icon numbers
source share