Closed ackman678 closed 9 years ago
The error was:
Attempting to badge the application icon but haven't received permission from the user to badge the application
Adding ability to register for the iOS 8 Notifications fixed it as discussed on stackoverflow
Added the following within TodoTxtAppDelegate.m
:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// registering for remote notifications
[self registerForRemoteNotification];
...and
- (void)registerForRemoteNotification {
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
UIUserNotificationType types = UIUserNotificationTypeSound | UIUserNotificationTypeBadge | UIUserNotificationTypeAlert;
UIUserNotificationSettings *notificationSettings = [UIUserNotificationSettings settingsForTypes:types categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];
} else {
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
}
}
#ifdef __IPHONE_8_0
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
[application registerForRemoteNotifications];
}
#endif
The icon Badge Count is frozen and won't change.
iOS 8.1.1, iPhone 5s
Shows count 3 event though I have Badge Count set to Priority A Tasks, but there are only two Priority A tasks in the file:
Then setting the Badge Count to 'none' doesn't change anything:
Tried making edits to todo.txt file, but this doesn't force update either:
Deleting and reinstalling the app through iCloud doesn't fix it either.