我的自动更新代码。
var Remote = require('remote');
var app = Remote.require('app');
var autoUpdater = Remote.require('auto-updater');
Polymer({
version: '',
created: function () {
this.version = app.getVersion();
this.result = '';
autoUpdater.setFeedUrl('https://atom.io/api/updates?version=0.16');
console.log('created');
autoUpdater.on('checking-for-update', function() {
console.log("checking-for-update");
});
autoUpdater.on('update-available', function() {
console.log("update-available");
});
autoUpdater.on('update-not-available', function() {
console.log("update-not-available");
});
autoUpdater.on('update-downloaded', function() {
console.log(" update-downloaded");
});
autoUpdater.checkForUpdates();
},
});
在 Mac OSX 上,终端输出以下日志:
Could not get code signature for running application, application updates are disabled: Error Domain=NSOSStatusErrorDomain Code=-67062 "The operation couldn’t be completed. (OSStatus error -67062.)"
在窗户上:
不输出任何东西。