Is there any way to provide custom icons for each NSUserNotification
, instead of the default app logo? Like the iconData
parameter in Growl
.
I want to show "Someone has just posted something" with the photo of this "someone".
You still cannot change the (default) image showing your app's icon, but starting in OS X Mavericks you can in addition display an additional image using the new property contentImage
, e.g. like this:
This new property isn't documented in the NSUserNotification
class reference, but mentioned in the Foundation Release Notes for OS X 10.9.
Currently not (Mountain Lion). You should post a feature request.
I know this question has been dead for 5 years, but in case someone finds that question and is still looking for a solution, there is that one:
https://github.com/indragiek/NSUserNotificationPrivate
I've tested it in macOS Sierra and it still works. Just be warned, quoting the project creator:
This should go without saying, but using any of this will result in your app being rejected from the MAS (Mac Apple Store) and potentially breaking if the APIs change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With