Is there a way to find out how many NSUserNotifications are in the NSUserNotificationCenter?

Is there any non-personal way to find out how many notifications there are in the Notification Center ( NSUserNotificationCenter ) in Mountain Lion? Not only notifications from my application, but also from all applications.

So, to summarize, what I want to do is get the number of notifications displayed here: enter image description here

I tried to find around, but I can not find information about this. Any ideas?
Thanks in advance!

+3
source share
1 answer

There is no public API for accessing notifications from other applications. The best way to access this information is to read the sqlite database located at ~/Library/Application Support/NotificationCenter/<UUID>.db . Please note that this will only work if your application is not isolated.

+7
source

All Articles