Remove application from Notification Center

Viewed 32895

Hey I was playing around with making a small cocoa application and using the new Notification Center API in Mountain Lion. However my app is now present in the notification center settings, together with Calendar, Messages and so on.

As it was just me playing around I want it to disappear from the list now, but I cannot find anyway to remove it, tried several things, dragging it out, holding alt+right click and so on. Does anyone know where the (probably a) plist that populates that list could be located?

11 Answers

Highlight the app in the list and hit fn+backspace or del/delete if you have that on your keyboard.

The following, perhaps heavy-handed approach seems to work for me when I get into this mess. It avoids changing AppID/etc. at least.

  1. Quit XCode
  2. rm -rf ~/Library/Developer/Xcode/DerivedData/*
  3. killall usernoted
  4. killall NotificationCenter
  5. rm ~/Library/Application Support/NotificationCenter/*
  6. Open System Preferences → Notifications (this seems to restart everything)

Reboot/log out is not required in this method.

I had trouble with BetterTouchTool not disappearing from the Notification Center after uninstall. Unfortunately, the methods mentioned here didn't work for me but I figured it out eventually.

For anybody having trouble getting this to work under High Sierra:

  1. In terminal, navigate to NotificationCenter folder:

    cd $(getconf DARWIN_USER_DIR)/com.apple.notificationcenter/
    
  2. get path using pwd and copy to clipboard (should be something like /var/folders/c3/289nmdsd2cz68yd5p47k553w0000gn/0/com.apple.notificationcenter)

    pwd
    
  3. In finder, go to folder (cmd+shift+g) and paste path
  4. Find the folder containing the db file and drag the entire folder to the trash (I had only one folder named "db2")
  5. Empty Trash! (This is very important, didn't work on my machine without it)
  6. Log Out and In again

There might be a more elegant way but this worked for me. Note that for some reason, the Database gets rebuilt with the application_id still present in the db-table (which is called app instead of app_id on High Sierra, btw), however the entry disappeared from the notification center.

For macOS Catalina, the path to the db can be found with lsof -p $(ps aux | grep -m1 usernoted | awk '{ print $2 }')| awk '{ print $NF }' | grep 'db2/db$' | xargs dirname

Related