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

NSUserNotification change Notification image/logo on a per-notification basis

When scheduling a NSUserNotification for delivery to NSUserNotificationCenter, is there any way to set the image/logo that shows up alongside the notification on a per-notification basis? I would like a slightly different logo to show up for…
Dom Vinyard
  • 2,038
  • 1
  • 23
  • 36
1
vote
1 answer

Mac App: Push Notifications Arriving, but Not Showing Up in Notification Center

I have a question about push notifications on macOS. I am successfully getting notifications in my Mac app (I can see them hit didReceiveRemoteNotification in my app delegate). But nothing actually shows up in Notification Center. The same…
1
vote
1 answer

What is the max limit of contentImage of NSUserNotification

I have a mac app that shows NSUsernotification with contentImage when the image is downloaded from the URL, however sometimes the Image is of a very large size, at this time the notification does not get delivered and I can see no error message in…
Geet
  • 2,427
  • 2
  • 21
  • 39
1
vote
1 answer

iOS: Do something when a UserNotification is received?

Is it possible to do something when the UserNotification message is delivered to the user every time? let tdate = Date(timeIntervalSinceNow: 10) let triggerDate = Calendar.current.dateComponents([.year,.month,.day,.hour,.minute,.second,], from:…
user6539552
  • 1,331
  • 2
  • 19
  • 39
1
vote
1 answer

User-Notification Did Receive Response Method Does not allow me to Pass Updated Variable to UIApplication.shared.open() ?

I'm asking UIApplication.Shared.Open() method to open default Message App in IOS. I've implemented UserNotification, where and userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse,…
Asim Khan
  • 508
  • 1
  • 7
  • 21
1
vote
1 answer

Local Notification gets fired even when remove app from simulator

i am implementing UserNotification in an app, Now the thing is that once i set a notification with repeat of every minute, it works fine. Once i remove app from simulator and install again, the old set notification keeps on striking.Don't it get…
kishan
  • 203
  • 1
  • 6
  • 15
1
vote
1 answer

Swift: Converting Local Notification to User Notification IOS 10

I have recently updated my project to IOS 10, which has caused any local notifications I had registered to not fire. I have tried to convert the local notification to user notifications but it is not having the same effect. Here is the original code…
Ryan Hampton
  • 319
  • 1
  • 4
  • 21
1
vote
1 answer

Custom NSUserNotifictation object

I am trying to modify the NSUserNotifictation to pass custom variables: @interface MyUserNotification: NSUserNotification @property (nonatomic) int theid; @property (nonatomic) NSString* url; @end @implementation MyUserNotification @end Then when…
maxisme
  • 3,974
  • 9
  • 47
  • 97
1
vote
1 answer

ObjectiveC - how to use NSUserNotification identifier property

According to the apple docs https://developer.apple.com/reference/foundation/nsusernotification/1416410-identifier NSUserNotification has a property called identifier which is suppose to replace notifications when the identifier is the same as…
1
vote
0 answers

MAC OS X UserNotification in Qt

I have implemented an UserNotificationAlert using NSUserNotification and NSUserNotificationCenter in qt. I have written the code to take action when the actionButton is clicked but unfortunately it is not getting executed. I have the following code.…
1
vote
1 answer

How to remove notification banner but leave it in notification centre on OS X?

What i'm doing now: [[NSUserNotificationCenter defaultUserNotificationCenter] removeAllDeliveredNotifications]; So my question is, how to leave notification in notification center?
1
vote
2 answers

Property additionalActions of NSUserNotification seems not working?

To understand NSUserNotification better, I wrote a little test app playing with this class. So far so good, except that no matter how hard I tried to feed the additionalActions property with array of NSUserNotificationAction objects, it never…
Terry
  • 337
  • 2
  • 9
1
vote
1 answer

NSUserNotification makes sound but does not show

My NSUserNotification is being delivered, playing the given sound, but doesn't show visually on the screen if my app is not the top-most application. If my application is in the background, the notification does not show. If my application is…
tenfour
  • 36,141
  • 15
  • 83
  • 142
1
vote
1 answer

Swift - using timers/system clock/background threads to do something in my application every hour

I'm using: var alarm = NSUserNotification() var currentTime = NSDate() alarmTime = currentTime.dateByAddingTimeInterval(60) alarm.deliveryDate = alarmTime NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification(alarm) To get a…
Spencer Wood
  • 610
  • 6
  • 15
1
vote
1 answer

How do I cancel orphaned NSUserNotifications on OS X?

I was doing some development with NSUserNotification in an OS X Yosemite app. It's all working great now, but in the process of development, I somehow orphaned scheduled daily NSUserNotifications on my system. Now I get notifications all day long…
theory
  • 9,178
  • 10
  • 59
  • 129