Mountain Lion added the new notifications system and the notifications center. There both similar to the iOS ones. They both have methods for remote and local notifications. The 10.8 SDK has 2 new classes for notifications: NSUserNotificationCenter and NSUserNotification. Just like iOS you can schedule local Notifications and send/recieve remote notifications (even when de App isn’t running). Unfortinaly apple hasn’t released the documantation yet. But here is some of the code you need to handle the (local) notifications in 10.8.
Note that you can only use notifications (and iCloud) when your app is Code Signed with an provisioning profile. But this doesn’t mean you have to distribute your app using the app store. But you will need to be Member of the Mac Developer Program. For distribution outside the app store you can use a Developer ID.
Schedule a (local) notification
//Initalize new notification
NSUserNotification *notification = [[NSUserNotification alloc] init];
//Set the title of the notification
[notification setTitle:@"My Title"];
//Set the text of the notification
[notification setInformativeText:@"My Text"];
//Set the time and date on which the nofication will be deliverd (for example 20 secons later than the current date and time)
[notification setDeliveryDate:[NSDate dateWithTimeInterval:20 sinceDate:[NSDate date]]];
//Set the sound, this can be either nil for no sound, NSUserNotificationDefaultSoundName for the default sound (tri-tone) and a string of a .caf file that is in the bundle (filname and extension)
//Get the default notification center
NSUserNotificationCenter *center = [NSUserNotificationCenter defaultUserNotificationCenter];
//Scheldule our NSUserNotification
This will make a notification appear, only when the app is in the background!
Removing notifications from the notifications center
When a notification is delivered it stays in de Notification Center until you delete it. The simplest way to do this is by deleting it when the user clicks on the notification.
First you will need to set the delegate of the Notification center