Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New location of the Notification Center .db file in 10.10?

Good morning all,

I have a little app which is using NSNotificationCenter to schedule notifications. I have no problems to access them during runtime and all works fine.

The problem starts when I close the app and restart it. I seem not to have any access to the notifications I scheduled during the first run.

Answers here suggest that there is a .db file in ~/Library/Application Support/NotificationCenter/ but this folder is not there in OS X 10.10 (not hidden, not in any of the other Application Support folders either) but I can see it on my 10.9 partition.

Has anybody an idea where this file is located now or if this functionality has been changed completely and the scheduled notifications are stored elsewhere?

Thanks for any hints, MDschay

like image 676
MDschay Avatar asked Nov 05 '14 09:11

MDschay


People also ask

Where is the Notification Center on macOS?

View notifications in Notification Centerin the upper-right corner of your screen, or swipe left with two fingers from the right edge of your trackpad. To view notifications that you missed, such as calendar alerts or FaceTime calls, click Notifications at the top of Notification Center.

How do you customize Notification Center on Mac?

To change these preferences, choose Apple menu > System Preferences, click Notifications & Focus , then click Notifications. Select an app or website on the left, then view or change settings on the right. The options vary by app. Customize notifications for an app or website.

Where is Notification Center on Mac Monterey?

Open Notification Center: Click the date and time in the menu bar, or swipe left with two fingers from the right edge of the trackpad. Close Notification Center: Click anywhere on the desktop, click the date and time in the menu bar, or swipe right with two fingers toward the right edge of the trackpad.

How do I open Notification Center?

To view Notification Center on the Lock screen, swipe upward from the middle of the screen until it appears. (You can enable or disable Notification Center on the Lock screen in Settings > Touch ID & Passcode or Face ID & Passcode.)


2 Answers

Thanks to some outside help I found out that the .db file location can be seen by doing the following:

  1. Open your Activity Monitor
  2. Seach for the process usernoted
  3. Go to the tab "Open files and ports"

The files listed there also contain the .db files I was searching for and it is in a /com.apple.notificationcenter/db subfolder under /private/var/folders (sorry for not posting the complete path but there are some pices which seem to be unique to each machine or user).

like image 119
MDschay Avatar answered Sep 19 '22 00:09

MDschay


As in 10.14.6 - Mojavae, it could be found using this command:

lsof -p $(ps aux | grep -m1 usernoted | awk '{ print $2 }')| awk '{ print $9 }' | grep 'db2/db$' | xargs dirname
like image 26
Oscar Zhang Avatar answered Sep 21 '22 00:09

Oscar Zhang