Add instructions to get Notifications working on Win 10 Update (#16320)

Fails silently and was frustratingly hard to know why. Hope this save a lot of people some time.
This commit is contained in:
Vik Ramanujam 2019-01-09 00:16:30 +08:00 committed by Shelley Vohr
parent 5c250455ad
commit 668049a593

View file

@ -23,9 +23,8 @@ While code and user experience across operating systems are similar, there
are subtle differences. are subtle differences.
## Windows ## Windows
* On Windows 10, a shortcut to your app with an [Application User * On Windows 10, a shortcut to your app with an [Application User
Model ID][app-user-model-id] must be installed to the Start Menu. Model ID][app-user-model-id] must be installed to the Start Menu. This can be overkill during development, so adding `node_modules\electron\dist\electron.exe` to your Start Menu also does the trick. Navigate to the file in Explorer, right-click and 'Pin to Start Menu'. You will then need to add the line `app.setAppUserModelId(process.execPath)` to your main process to see notifications.
* On Windows 8.1 and Windows 8, a shortcut to your app with an [Application User * On Windows 8.1 and Windows 8, a shortcut to your app with an [Application User
Model ID][app-user-model-id] must be installed to the Start screen. Note, Model ID][app-user-model-id] must be installed to the Start screen. Note,
however, that it does not need to be pinned to the Start screen. however, that it does not need to be pinned to the Start screen.
@ -97,4 +96,4 @@ GNOME, KDE.
[notification-spec]: https://developer.gnome.org/notification-spec/ [notification-spec]: https://developer.gnome.org/notification-spec/
[app-user-model-id]: https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx [app-user-model-id]: https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx
[set-app-user-model-id]: ../api/app.md#appsetappusermodelidid-windows [set-app-user-model-id]: ../api/app.md#appsetappusermodelidid-windows
[squirrel-events]: https://github.com/electron/windows-installer/blob/master/README.md#handling-squirrel-events [squirrel-events]: https://github.com/electron/windows-installer/blob/master/README.md#handling-squirrel-events