OSX Native Notifications don't display on packaged app
The chrome.notification.create displays fine when we run our app directly on NWJS. But when we package it, rename the main app file and sign it all, the notifications do not display any more.
There is no error or anything - the chrome.notification.create just don't display any popup in the MacOS Notification center.
I tried --enable-features=NativeNotifications and also checked the info.plist for any difference but nothing helps. When the app is packaged and installed in the Applications - the notifications just don't show.
Is there some special security setting or something for the MacOS that we are missing @rogerwang ? Also we renamed the main app but not the nwjs Helper.
NWJS Version : 0.28.2 Operating System : Mac OSX 10.12.6
We would really like to take advantage of the new native notification on MacOS so hope this can be resolved soon.
Any idea what might be causing this @rogerwang ? Otherwise we are stuck to use old nwjs version prior the osx native notifications integration and will really hate this...
Will see it soon.
On Sun, Apr 22, 2018, 3:38 PM George Petrov [email protected] wrote:
Any idea what might be causing this @rogerwang https://github.com/rogerwang ? Otherwise we are stuck to use old nwjs version prior the osx native notifications integration and will really hate this...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nwjs/nw.js/issues/6568#issuecomment-383362063, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKGGboAgcYZ-OFKilDOf7KNuLZvMIkmks5trDNogaJpZM4TVZPV .
Could you please provide a minimal sample that you packed?
well here is the full app, could't strip it down, but it is free anyway:
you can just install it from the DMG and then with finder in Applications explore the app contents. Hope you can see the packaging error or missing stuff
How to use it? It quits after showing this dialog.

@Christywl could you please try to reproduce this with a minimal example?
@rogerwang it works together with Adobe Dreamweaver - it manages its extensions. So it is looking for Dreamweaver.
But I thought you don't need to start it - just explore the app package contents and info.plist it is difficult also the replicate the current push messaging flow
I suspect that there is something because of the renaming of nwjs to the new app name (DMXzone Extension Manager)
If I don't start it how should I reproduce you bug? And a minimal sample should be more productive.
Agree - will make a minimal example
@rogerwang - ok found the problem when making the minimal example :)
It was the requireInteraction flag in the chrome.notifications.create call! If the flag is set the messages don't appear in the final mac app. See https://developer.chrome.com/apps/notifications
maybe the flag is useless anyway as the native mac notifications are controlled by the NSUserNotificationAlertStyle option in the Info.plist but maybe NWJS should privide a way to override the setting through this flag? and not just not displaying the messages ... https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html
Here is the minimal example app: https://www.dmxzone.com/beta/Test-Push-Notifications-Mac-1.0.0.dmg
Source code: https://www.dmxzone.com/beta/push_notifications.zip
Small update: also you should'n include --enable-features=NativeNotifications as then the notifications won't popup on Windows any more. Seems it is an old setting anyway and not needed on OSX
With the source code, it works fine on Mac OS X with nwjs-sdk-v0.30.0. But if I install the dmg app, 'Send Push Notification with requireInteraction' doesn't work, the notification doesn't display.
I can confirm I am having the same problem. If I include "requireInteraction", it simply won't show on my mac.
Same here, as soon as "requireInteraction" is specified the notifications are not shown anymore
Can confirm this on mojave, nwjs 36.