Sunbird desktop app updates
Introduction
This wiki details the different ways to provide the app updates to the end-user and there pros and cons and finally conclude on the approach
Approach 1 - New installer
In this approach, we will provide the latest version of the app to the end-user then he needs to install with the new app which will be as follow
Operating System | Works |
---|---|
Windows | Yes |
Mac | Yes |
Ubuntu | Yes |
Pros
- Simple and secure
- No development required for the app updates
Cons
- User need to update the app manually
- Can't provide force update
- Can override new version of the app with the old one
- User should know that new update available which requires communication to the user
Approach 2 - Electron auto-updater
Here app updates are provided using electron builder by building the app with publishing flag which will generate metadata to check for the update here we need to add electron-updater as a dependency require to code for to check and install the update
Operating system | Works |
---|---|
Windows | Yes |
Ubuntu | No |
Mac | Yes |
Pros
- Can provide force update
- Comes out of the box
- Code signature validation not only on macOS but also on Windows.
- All required metadata files and artifacts are produced automatically.
- Download progress and staged rollouts supported on all supported platforms.
- It provides logs for the app update
Cons
- Doesn't work in Ubuntu OS
- No granular control
Approach 3 - Custom update
Here we will provide the app update in signed zip format which will be downloaded and install in the app which requires development to check for the update and install the update
Operating system | Works |
---|---|
Windows | Yes |
Ubuntu | Yes |
Mac | Yes |
Pros
- Can auto-update the app
- More granular control
- Works for all the operating systems
- Can provide force update
Cons
- Development effort (Managing the update versions)
- Reliability needs to be proven
- UI to show update and check for updates
- It needs the packaging structure
- Code required to push and pull the updates
Conclusion
Based on the above we will provide an app update with approach 1 which is providing a new installer for app update currently then we will move onto providing updates with approach 3 where we have control to update the app.
After design review conclusion is since we will have desktops which may not be connected or connected we will go with showing predictable update URL like <baseUrl>/latest/Desktop_1.0.1.exe to the user based on the different dimension like the new version of the content being imported in the old app or if the app is connected to the internet then check if there is new app is available and show the user URL and QR code of the URL to download in other device or same device and update the app.