My Mac App updates it's badge number at a certain time.
Here is my function:
- (void)setBadgeNumber
{
// Sets the badge number to 1.
[[[NSApplication sharedApplication] dockTile] setBadgeLabel:@"1"];
// Sends a notification.
NSUserNotificationCenter *nc = [NSUserNotificationCenter defaultUserNotificationCenter];
NSUserNotification *notification = [[NSUserNotification alloc] init];
notification.title = @"Update";
notification.informativeText = @"There's something new in the app!";
[nc deliverNotification:notification];
}
I was wondering if you can execute this function at a certain date (for example: 08-08-2015).
Even if the app isn't running (also if the app is running).
Does somebody know if you can execute a method at a certain date (and time)?