Here is my code:
for (NSManagedObject *object in array) {
if ([[object valueForKey:@"DueDate"] isLessThan:[NSDate date]]) {
count++;
NSLog(@"Looped");
NSString *test = [[NSString alloc] initWithFormat:@"%@", [object valueForKey:@"DueDate"]];
NSLog(@"%@", test);
}
}
NSLog(@"%i", count);
NSDockTile *aTitle = [[NSApplication sharedApplication] dockTile];
[aTitle setBadgeLabel:[NSString stringWithFormat:@"%i", count]];
For some reason this code is adding 8 to the dock icon when it should be 2