Sending Notifications to the Notification Center under OS X 10.8 Mountain Lion

Published on Christian Mayer's Weblog

Here is a sample code how to send push notification to the Notification Center under Apples OS X 10.8 Mountain Lion.

Add this to your applicationDidFinishLaunching function in the AppDelegate.m file.

NSUserNotification *note = [[NSUserNotification alloc] init];
[note setTitle:@"TestApp"];
[note setInformativeText:@"Hello World!"];
NSUserNotificationCenter *center = [NSUserNotificationCenter defaultUserNotificationCenter];
[center scheduleNotification:note];

Recent Posts

About the Author

Christian is a professional software developer living in Vienna, Austria. He loves coffee and is strongly addicted to music. In his spare time he writes open source software. He is known for developing automatic data processing systems on Debian Linux server.

Categories: Productivity, Programming
Tags: OS X, OS, X, Apple, Mountain Lion, 10.8, Push Notification Center, Notification Center, Notification, Center, XCode, Objective-C, ObjectiveC, ObjC

Archive | Categories | RSS Feed | Usage | Imprint
Copyright © 2006 by