mac平台下electron使用autoUpdater没有apple签名,有自动更新成功的吗?image.png
是必须要给苹果交钱这自动更新功能才能用吗?
const { app, autoUpdater,dialog } = require('electron');
const server = 'http://localhost:3000';
autoUpdater.setFeedURL({ url: `${server}/download/latest/${process.platform}` });
autoUpdater.on('update-downloaded', (info) => {
// Show a dialog asking the user if they want to restart the app to install the update
dialog.showMessageBox({
type: 'question',
buttons: ['Install and Restart', 'Later'],
defaultId: 0,
message: 'A new update has been downloaded. Would you like to install and restart the app now?'
}, (response) => {
if (response === 0) {
// User clicked 'Install and Restart'
autoUpdater.quitAndInstall();
}
});
});
这个所谓的自动更新是不是只是提示有更新,点一下自动下载安装包而已?