App Updater Mac



  1. App Updates Microsoft One Drive
  2. My Mac Updater
  3. Garmin Lifetime Updater Mac
  4. Mac App Updater Github

最新博文地址:https://segmentfault.com/a/1190000012904543

发客户端一定要做的就是自动更新模块,否则每次版本升级都是一个头疼的事。
下面是Electron应用使用electron-builder配合electron-updater实现自动更新的解决方案。

1.安装 electron-updater 包模块

Updater

2.配置package.json文件

2020-8-24  Daily Mac App Updates: 2020-08-21 Application Version Store Type Popularity; Visual Studio Code 1.48.1.

  1. 2020-9-8  Updater Channel Adware is classified as a potentially unwanted app for Mac. It appears like a normal app, but it may cause unpleasant pop-ups and redirects on your Mac. Be aware, that Updater Channel Adware may be able to affect the browsers Safari, Google Chrome, Mozilla Firefox, Edge and Opera.It may they perform unwanted activities on your Mac.
  2. 2019-12-12  MacUpdater,堪称 Mac 上管理 app 更新的「瑞士军刀」。 它不仅没有上面 CleanMyMac X 的局限,而且在使用体验上也极为优秀。 如果偏要找什么缺点的话,那只能说 UI 没有 CleanMyMac X 好看,以及图标还是复古的「拟物风」吧。.

为了打包时生成latest.yml文件,需要在 build 参数中添加 publish 配置。

注意:配置了publish才会生成latest.yml文件,用于自动更新的配置信息;
3.配置主进程main.js文件(或主进程main中的index.js文件),引入 electron-updater 文件,添加自动更新检测和事件监听:
注意:一定要是主进程main.js文件(或主进程main中的index.js文件),否则会报错。

4.在视图层中触发自动更新,并添加自动更新事件的监听。
触发自动更新:

监听自动更新事件:

App Updates Microsoft One Drive

为避免多次切换页面造成监听的滥用,切换页面前必须移除监听事件:

5.项目打包
执行electron-builder进行打包,windows下会生成安装包exe和latest.yml等文件,执行exe安装软件;Mac下会生成安装包dmg和latest-mac.yml文件,执行dmg安装软件。
windows打包生成文件:

Mac打包生成文件:

6.软件升级版本,修改package.json中的version属性,例如:改为 version: “1.1.0” (之前为1.0.0);
7.再次执行electron-builder打包,将新版本latest.yml文件和exe文件放到package.json中build -> publish中的url对应的地址下;
8.在应用中触发更新检查,electron-updater自动会通过对应url下的yml文件检查更新;

windows上自动更新示例:

mac上自动更新示例:

My Mac Updater

如果这篇文章对你的工作或者学习有帮助的话,请收藏或点个赞。如果对其中有什么不明白的或者报错,可以留言或者加QQ群140455228交流

posted @ 2018-01-22 11:17qirui 阅读(13104) 评论(7) 编辑收藏

How to get updates for macOS Mojave or later

If you've upgraded to macOS Mojave or later, follow these steps to keep it up to date:

Garmin Lifetime Updater Mac

  1. Choose System Preferences from the Apple menu , then click Software Update to check for updates.
  2. If any updates are available, click the Update Now button to install them. Or click ”More info” to see details about each update and select specific updates to install.
  3. When Software Update says that your Mac is up to date, the installed version of macOS and all of its apps are also up to date. That includes Safari, iTunes, Books, Messages, Mail, Calendar, Photos, and FaceTime.

To find updates for iMovie, Garageband, Pages, Numbers, Keynote, and other apps that were downloaded separately from the App Store, open the App Store on your Mac, then click the Updates tab.

To automatically install macOS updates in the future, including apps that were downloaded separately from the App Store, select ”Automatically keep my Mac up to date.” Your Mac will notify you when updates require it to restart, so you can always choose to install those later.

How to get updates for earlier macOS versions

If you're using an earlier macOS, such as macOS High Sierra, Sierra, El Capitan, or earlier,* follow these steps to keep it up to date:

  1. Open the App Store app on your Mac.
  2. Click Updates in the App Store toolbar.
  3. Use the Update buttons to download and install any updates listed.
  4. When the App Store shows no more updates, the installed version of macOS and all of its apps are up to date. That includes Safari, iTunes, iBooks, Messages, Mail, Calendar, Photos, and FaceTime. Later versions may be available by upgrading your macOS.

To automatically download updates in the future, choose Apple menu  > System Preferences, click App Store, then select ”Download newly available updates in the background.” Your Mac will notify you when updates are ready to install.


* If you're using OS X Lion or Snow Leopard, get OS X updates by choosing Apple menu  > Software Update.

How to get updates for iOS

Learn how to update your iPhone, iPad, or iPod touch to the latest version of iOS.

Learn more

Mac App Updater Github

  • Learn how to upgrade to the latest version of macOS.
  • Find out which macOS your Mac is using.
  • You can redownload apps that you previously downloaded from the App Store.
  • Your Mac doesn't automatically download large updates when it's using a Personal Hotspot.