Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 1002 Bytes

update-osx.md

File metadata and controls

23 lines (15 loc) · 1002 Bytes

Auto-updater on OS X

Electron Release Server provides a backend for the Squirrel.Mac auto-updater. Squirrel.Mac is integrated by default in Electron applications.

Endpoint

The endpoint for Squirrel.Mac is http://download.myapp.com/update/osx/:currentVersion. The server is smart enough to also match the platform to darwin,darwin_64,macos, and mac.

This url requires different parameters to return a correct version: version and platform.

Electron Example

For example with Electron's autoUpdater module:

var app = require('app');
var os = require('os');
var autoUpdater = require('electron').autoUpdater;

var platform = os.platform() + '_' + os.arch();  // usually returns darwin_64
var version = app.getVersion();

autoUpdater.setFeedURL('http://download.myapp.com/update/'+platform+'/'+version);