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
0
votes
0 answers

How to send local usernotifications based on user input

How am I able to send user notifications in iOS 10 using UNNotifications on a specific day and repeat it? The user has the option to select a few days when he wants to receive the notifications: If the user selects for example: Tuesday, Thursday,…
user5000215
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
0 answers

removeAllDeliveredNotifications on watchOS3

How can I remove delivered notifications on watchOS? override func willActivate() { super.willActivate() UNUserNotificationCenter.current().removeAllDeliveredNotifications() } It doesn't work.
0
votes
1 answer

NSUserNotification() onclick in OS X

How can I make a notification clickable? I want that when a user clicks the notification on the Mac, Safari opens with the specified link.
fredsco
  • 313
  • 4
  • 19
0
votes
1 answer

Handling Click Events with NSUserNotification Sent from CLI App

I have created an OSX command line application in Objective C and it now fires sidebar notification events like so: NSUserNotification *n = [[NSUserNotification alloc] init]; n.title = @"My Title"; n.subtitle = @"my subtitle"; n.informativeText =…
Volomike
  • 23,743
  • 21
  • 113
  • 209
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
2 answers

NSUserDefaults different value when return to background

I save a value in NSUserDefaults when I put my app in background mode, and then when the app becomes active again the value is different. I save the value: - (void)appDidEnterBackground:(NSNotification *)notification { //Tiempo inicial de…
amurcia
  • 801
  • 10
  • 26
0
votes
1 answer

In OS X 10.9 (xcode 5.1), how to show local notification on top-right(menu bar) in my program?

Why local notification is no supported by OS X 10.9? I know IOS has UILocalNotification Class. I want to show some notification bellow menu bar which is generated by my program. Is there any alternate way to do this? Or should I write my own local…
Yifan Wang
  • 504
  • 6
  • 13
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
1 answer

ObjC: can't subclass NSUserNotification

As the title says, I can't subclass NSUserNotification. Well, I can write and compile the subclass but then I can't get subclassed objects at runtime: if I create an instance of that subclass and then I test its class at runtime I always get…
user732274
  • 1,069
  • 1
  • 12
  • 28
0
votes
1 answer

Can not find protocol declaration for NSUserNotificationCenter in xcode 4.5

I am trying to implement a simple notification application, I have a xcode 4.5 on my machine. I have created a empty application and added a class which is derived from NSObject, but when i want to implement a NSUserNotificationCenter protocol for…
-1
votes
1 answer

Need advice for beginner web developer. Building user notification system

web guru and all who interested, I've built simple web application where users can post, comment, favourite articles and right know I've the idea to create a users notification system. At the beginning really simple: notify if user's post was…
Saulius s
  • 601
  • 2
  • 9
  • 18
1 2 3 4 5 6
7