At this point, you should have at least one application with a tracking ID in your Nucleus account.
In this chapter, you have an app called My App whose current version is 0.0.1, as shown in the following screenshot:
Your application can track version changes and execute certain pieces of code each time an update happens.
The API is in the following format:
Nucleus.onUpdate = version => {
// do something with the vesion
}
For the sake of simplicity, let's raise a standard JavaScript alert message on each version update:
- Update the main.js file according to the following code:
const { app, BrowserWindow } = require('electron');
const Nucleus = require('electron-nucleus')('Your App ID', {
onlyMainProcess: true,
version:'0.0.1'
});
function createWindow() {
const win = new BrowserWindow({
width:...