问题描述
我正在尝试通过了解是否覆盖签名的electronic.app.Electron或将其完全删除
我已经在测试模式(npm run start
)以及以.exe
包装时进行了测试
我还注意到我删除了签名的图标,但是这种签名很不愉快。
function showNotification() {
const notification = new Notification("new message",{
body: "app launched",icon: __dirname + '/icon.ico',tag: 'soManyNotification',hasReply: true
})
}
console.log(Notification.permission)
if (Notification.permission === "granted") {
showNotification()
//alert('we have permission');
} else if (Notification.permission === "denied") {
Notification.requestPermission()
};
任何帮助将不胜感激^^
解决方法
// If this is running on Windows then set UserModelID for notification
if (isWin()) {
app.setAppUserModelId("Proper name to be replaced");
}