julienXX / terminal-notifier

Send User Notifications on macOS from the command-line.
Other
6.36k stars 331 forks source link

fixes an issue on MacOS Big Sur 11.6 (#288) #289

Open johnlee999 opened 2 years ago

johnlee999 commented 2 years ago

After upgrading MacOS to 11.6, terminal-notifier shows another notification with a message "terminal" when you click the original notification. (see issue #288 ) It seems that terminal-notifier can't receive any message by notification center from 11.6. So it makes 'userNotification' always null.

Thus, this never runs.

 if (userNotification) {
    [self userActivatedNotification:userNotification];

Terminal-notifier quits after it delivered a notification. But if terminal-notifier is still alive after the notification, it can receive the message. So I tried to make it keep alive as a daemon.

I'm not sure yet if there's the side effects of allowing it to be resident, but it can now opens url I gave by clicking the notification.

synconclick commented 2 years ago

Hello, can you please provide the steps on how you kept Terminal-notifier alive as a daemon? Thanks

johnlee999 commented 2 years ago

@synconclick Hi. Basically, it's controlled by isDaemon flag. Could you check the diff of my commit?