3 Replies Latest reply: Apr 11, 2013 9:53 PM by Mani Hamedani
ntkdung Level 1 (0 points)

Hi all,


I have no idea about this bug. I installed my app and do something to add notification. There is a badge number on the icon app as I expected. But when I remove the app and then install it again, I still see the badge number on the icon app until I start the app. As my expectation, I think the badge number must be clear when the application is removed, but here, it is not. What happened and why? How can I fix that?


Do you have any idea on this problem?

  • Mani Hamedani Level 1 (60 points)

    I think it is related to the application preferences file which is located at ~/library/preferences or /library/preferences folders, depending on your application installation. If the app is installed to be used by current logged in user, the .plist file is located at ~/library/preferences, and otherwise it is placed at /libaray/preferences.


    When you remove an app from Applications folder, it's related files, such as preferences files, application support files, and cache files are not removed, as they are placed some where else on the system. To completely remove an app, you should search your system for the application specific file name, and include system folders in the search options. You will see there are other files out there which are associated with the app. Remove all of the completely.


    In this special case, since you just want to remove the badge file, I think removing the .plist file is enough. If you remove the .plist file and don't get the desired result, remove other application associated files.


    The .plist files, are where your application store special settings, usually user preferences.


    Hope that hellps


    Mani Ghasemnia Hamedani

  • ntkdung Level 1 (0 points)

    Thank you for you reply, but this bug also happends in device, not just in the simulator.


    In case I use the device, how can I fix that? Because when I remove the app in device, I try to install it again, and I see the badge before I click to launch the app. After I launch the app, the badge is reset so it disappears as expected.

  • Mani Hamedani Level 1 (60 points)

    I am not sure, but it seems that iOS stores badge information of apps in some place. Its the reason that you remove the app and after second installation, the badge appears again. When you relaunche the app, it restores the badge information to its default value.


    I think that you do not remove the badge in your code. In other words, you have set the badge, and the badge remains valid, even if you remove the app.


    Have you ever tried to remove the badge before uninstalling the app? The app should reasonably clear the badge info itself. Thats why the badge still appears after removing and installing again, but launching the app resets the badge info.


    So, try to remove the badge in the code, then remove the app and install it again.


    Hope this helps you.


    Mani Ghasemnia Hamedani