Questions tagged [nsusernotification]

NSUserNotifications are a key component of the programmatic interface to Notification Center

NSUserNotifications are a key component of the programmatic interface to Notification Center, a new technology introduced in Mac OS X 10.8 ("Mountain Lion"). Notification Center allows applications to show iOS-inspired notifications in the upper right corner of a user's screen; these notifications are also collected into a sidebar users can view on demand.

104 questions
4
votes
1 answer

Simultaneous NSUserNotification Alerts On Mountain Lion

I'm attempting to create New Email alerts (via AppleScript and a Cocoa app) for Outlook 2011 that display through the ML Notification Center. It's 90% there, the only issue is that when more than 1 email arrives at a time, the second alert quickly…
3
votes
2 answers

NSUserNotification close calls didActivateNotification

Since MacOS 10.13 everytime I click the close button on a NSUserNotification it calls: - (void) userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification How can I prevent this or handle…
maxisme
  • 3,974
  • 9
  • 47
  • 97
3
votes
0 answers

Iphone 7 plus craches on application start With Springboard Error iOS 10

At application launch, my app is crashing with the following stack trace. The weird thing is, the app runs fine on any other iOS 10 device including the iPhone 7, but crashes on iPhone 7 Plus. The error looks to be in the new UserNotifications…
3
votes
1 answer

Creating interactive notifications for OS X

Mac Basics: Notifications keep you informed states that it's possible to create an interactive alert with an text input field: For example, you can reply to a chat directly from a notification. How can I implement it? For instance, I have a…
Michael Samoylov
  • 2,933
  • 3
  • 25
  • 33
3
votes
0 answers

read NSUserNotification display style

I am implementing an application that displays notifications using NSUserNotificationCenter. Everything works fine by now. I have added NSUserNotificationAlertStyle key with alert in the plist so I get the default selection to alert style. However…
3
votes
1 answer

How can I update the subtitle in a delivered NSUserNotification?

I'm trying to update the string in the subtitle of a delivered notification (alert), I'm doing it with an NSTimer like this: [NSTimer scheduledTimerWithTimeInterval:5.0 target:self …
3
votes
1 answer

Python, Mac OS X NSUserNotification, action button

I am having some trouble understanding how to get an NSUserNotification's action button to do something using Python. I think I understand that "userNotificationCenter_didActivateNotification_" is called when a user clicks the button? But I can't…
adamteale
  • 940
  • 2
  • 12
  • 27
3
votes
1 answer

Cocoa: User Notifications never being delivered

I'm trying to deliver a local notification, it looks something like this: NSUserNotification *notification = [[NSUserNotification alloc] init]; //set title, subtitle, and sound [[NSUserNotificationCenter defaultUserNotificationCenter]…
3
votes
1 answer

Is there any way of knowing how many NSUserNotifications there are in NSUserNotificationCenter?

Is there any non-private way of knowing how many notifications there are in the Notification Center (NSUserNotificationCenter) in Mountain Lion? Not just notifications from my app, but from all apps. So, to sum things up, what I want to do is to…
3
votes
1 answer

Always Show the NSUserNotification

I have my NSUserNotification showing up to document when something within my app happens. Is there any way to show the notification even when the app is the frontmost app (i.e., always show it)? (it does show up if I'm in some other app)
Benny
  • 185
  • 1
  • 13
3
votes
2 answers

removeDeliveredNotification: doesn't

I have some code in my Mac app that performs a long-running export operation. At the end of the export, it creates a user notification to let the user know it's finished: - (NSUserNotification*)deliverNotificationWithSound:(NSString*)sound…
3
votes
1 answer

How to handle HTML5 Web Notifications with a Cocoa WebView?

I use a Cocoa WebView to display a website which sends HTML5 Web Notifications. When browsing this page using Safari, I receive User Notifications directly in the Notification Center of Mac OS X Mountain Lion. How I can achieve the same behavior by…
3
votes
1 answer

How to make an app use Growl on Lion and Notification Center on Mountain Lion?

I am making an app that uses notification center on mountain lion. I included support for growl on snow leopard and lion. How do I make it so the binary will be able to run on both and not require 2 separate .app bundles.
Weston
  • 1,481
  • 1
  • 11
  • 31
3
votes
1 answer

How to find out style of NSUserNotification during run-time? Or force close an alert?

According to OS X Mountain Lion Release Notes: "The user has ultimate control over what notifications are displayed, and the style (banner, alert, etc). There is no mechanism to override the user preferences." Even though all I want to do is…
3
votes
1 answer

NSUserNotification state

Is there a way to determine if a certain NSUserNotification is still on screen or it has been dismissed? I haven't found a way to do this.
user732274
  • 1,069
  • 1
  • 12
  • 28