我的电子应用程序没有在Windows 10上显示桌面通知.Mac和Linux工作正常 .
我正在使用电子打包器来构建 .
文档说“在Windows 10上,必须在开始菜单中安装具有应用程序用户模型ID的应用程序的快捷方式 . ”所以我在main.js中调用app.setAppUserModelId(myID),然后在C:\ Users \ sam \ AppData \ Roaming \ Microsoft \ Windows \ Start Menu \ Programs中放入.exe的快捷方式
仍然没有通知 . 我不确定我做错了哪一步 .
1 回答
我正在使用electron-builder,它就像一个魅力 .
Electron multiplatform notifications
我将此代码上传到了GitHub repository . 它适用于Windows,MacOS和Linux . 如果您希望该通知在Windows上运行,则需要安装运行'npm run dist'的应用程序 . 它会创建一个名为'dist'的文件夹,您可以在其中找到安装程序 .