Questions tagged [nsusernotificationcenter]

The NSUserNotificationCenter class is an Objective-C class for the OS X AppKit and delivers application notifications to the global system notification center.

The NSUserNotificationCenter class delivers user notifications to the user from applications or helper applications.

More information in developer.apple.com

58 questions
0
votes
1 answer

Is there any way to trigger local notifications when iOS 10 app is in the background?

I'm trying trigger local notification when I receive remote push notification (VoIP PushKit) which start my app in the background. I see my local notification in array of the pending notifications at the…
0
votes
1 answer

When should Notifications in the NSUserNotificationCenter be removed?

I wanted to ask about the best programming practices for using removeAllDeliveredNotifications() in the NSUserNotificationCenter. I couldn't find in any of the documentation if the NSUserNotificationCenter automatically removes delivered…
0
votes
3 answers

How to get Application states in iOS 10 notification?

I am using userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)())completionHandler for getting the notification response in iOS 10, can anyone…
Sachin Nautiyal
  • 568
  • 4
  • 15
0
votes
1 answer

NSUserNotification Custom Sound (OS X, Sandboxed App)

I'd like to use a custom sound for Notification Center, but cannot find much documentation on this. I know how to assign a sound to a notification, and I know how to copy new sound files to ~/Library/Sounds then use these new sounds. My app is…
0
votes
1 answer

NsUserNotification: Elide a title at the beginning instead of the end

All three of title, subtitle and informativeText elide their content if it's too long to be displayed. All of them elide them at the end. Is there away to elide it at the beginning? This would be useful for example when trying to display a long…
0
votes
1 answer

How to make my NSUserNotification stay displayed until dismissed?

I am presenting our users with a high priority notification via an NSUserNotification, and I want it to stay persistently up until dismissed (like the App Store and Calendar apps do). Is there a flag of some sort I can set to get this behavior?
RealCasually
  • 3,593
  • 3
  • 27
  • 34
0
votes
1 answer

Notification Center (OS X) - variable as title

I have problem with set variable in content of Notification Center. This is my code NSUserNotification *notification = [[NSUserNotification alloc] init]; [notification setTitle:@"version of app"]; [notification setInformativeText:@"message"]; //…
mrfox
  • 49
  • 9
0
votes
1 answer

NSUserNotificationCenter delegate not work when the app is not focus

I have the code like this. [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification]; [[NSUserNotificationCenter defaultUserNotificationCenter] setDelegate:self]; Also, I implement…
Kroderia
  • 623
  • 4
  • 15
0
votes
1 answer

Not receiving reply from notification

I am trying to get a reply from a notification and pass the string to a label. But the label (nResponse) does not change after I give the reply, why isn't the label updating? Is there a problem with the "activationType"…
0
votes
2 answers

Create notification with reply field

How do i get input from a notification with a reply field. I have not found anything in the documentation Here is my current code, what do I need to get a response from the user? #import "AppDelegate.h" @implementation AppDelegate @synthesize…
kyle k
  • 5,134
  • 10
  • 31
  • 45
0
votes
1 answer

Creating custom NSUserNotificationCenter instance

How can I create a new, custom NSUserNotificationCenter instance? I don't mean [NSUserNotificationCenter defaultUserNotificationCenter], I mean something like [NSUserNotificationCenter new] (which doesn't work, for me).
user732274
  • 1,069
  • 1
  • 12
  • 28
0
votes
2 answers

NSUserNotificationCenterDelegate methods not called on only one machine

I'm trying to use NSUserNotificationCenter. I'm able to deliver notifications successfully. I'm using the ShouldPresentNotification callback on NSUserNotificationCenterDelegate to present notifications, even when the app is running in the…
TheNextman
  • 12,428
  • 2
  • 36
  • 75
0
votes
1 answer

AppleScripting an app to change background of Notification Center in OSX 10.8

here's my code: set NCBGPath to path ("Machintosh hd:System:LIbrary:Core Services:Notification Center:Contents:Resources") set NCBackground to {"linen.tiff"} set themeFolder to choose folder with prompt "Choose a Theme" tell application "Finder" if…
1 2 3
4