I am experimenting with cleaning notifications from the notification center (in cases where workarounds include setting the icon number to 0, since there is no api to delete them).
However, during the experiments, I noticed that I can not get setApplicationIconBadgeNumber to have any effect on the icon number.
For example, if I have:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UIApplication sharedApplication] setApplicationIconBadgeNumber: 5];
(and setApplicationIconBadgeNumber is no longer called)
then the icon for the icon is missing, not to mention the one containing the number.
(Notifications do not set the icon number, perhaps there must be an icon number first before setApplicationIconBadgeNumber: has any effect, can anyone confirm or refute this?)
UPDATE :, I noticed this in the console, possibly related to it:
May 24 16:12:49 unknown installd[138] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile
May 24 16:12:49 unknown SpringBoard[51] <Warning>: Killing com.mycompany.xxx for termination assertion
May 24 16:12:50 unknown installd[138] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile
May 24 16:12:50 unknown SpringBoard[51] <Warning>: Reloading application state for 'com.mycompany.xxx' as its modification date or path has changed
May 24 16:12:50 unknown SpringBoard[51] <Warning>: Reloading and rendering all application icons.
, , , , .., Xcode.