Last active
June 19, 2016 15:01
-
-
Save TheFox/c6fd7c66d2f1ecdbfc9e to your computer and use it in GitHub Desktop.
Sample code how to send push notification to the Notification Center under Apples OS X 10.8 Mountain Lion.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSUserNotification *note = [[NSUserNotification alloc] init]; | |
[note setTitle:@"TestApp"]; | |
[note setInformativeText:@"Hello World!"]; | |
NSUserNotificationCenter *center = [NSUserNotificationCenter defaultUserNotificationCenter]; | |
[center scheduleNotification: note]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment