Set Application name for NSUserNotification

We are using NSUserNotification to display local notifications on macOS in notification center. However, when the applications are displayed within the Notification Center window, they have, as the name of the application, the name of our app bundle (i.e. if our application were installed in /Application/MyApplication.app, it would show as "MYAPPLICATION".


We would like to change/modify this string that gets displayed within Notification Center (idealy, localized). We've tried changing CFBundleName and CFBundleDisplayName - and localizing them both - to no avail. The only way we have found to change the name that displays in notification center is to change the name on-disk (i.e. to name the application /Application/MyLocalizedApplicationName.app)


It doesn't seem like this is the "right" approach...is there some other way to set the name of the application that gets displayed in notification center?


(to clarify a bit, this is when opening notification center and looking at *previously-received* notifications. It also is the name that shows up when opening the "Notifications" settings pane)

Post not yet marked as solved Up vote post of Toonetown Down vote post of Toonetown
1.1k views

Replies

We are seeing the same issues with UNUserNotificationCenter. This is exacerbated by the fact that macOS 11 display's the sending app's name prominently in each notification, much more visibly than before.
Update: With the instructions in this StackOverflow article, I was able to at least change the app's display name in the "Notifications" System Preferences. After a reboot, the desired localized app name also shows up in notification titles.

Note that this also shows the app's name in the Finder, but it does not change the actual file path to the application bundle. This is fine for my use case (a helper app with a fixed path that I want to present under a more user-friendly name).