A simple app-updater for macOS, checks your GitHub releases for a binary asset and silently updates your app.
English · 简体中文
appupdater.mp4
AppUpdater is a rewrite of mxcl's AppUpdater, because I don't want to depend on the PromiseKit it uses and would prefer to implement it using async/await.
- Assets must be named:
\(name)-\(semanticVersion).ext
. See Semantic Version - Only non-sandboxed apps are supported
- Implement a settings update page suitable for SwiftUI
- Full semantic versioning support: we understand alpha/beta etc.
- We check that the code-sign identity of the download matches the running app before updating. So if you don't code-sign I'm not sure what would happen.
- We support zip files or tarballs.
- We support a proxy parameter for those unable to normally access GitHub
package.dependencies.append(.package(url: "https://github.com/s1ntoneli/AppUpdater.git", from: "0.1.5"))
var appUpdater = AppUpdater(owner: "s1ntoneli", repo: "AppUpdater")
appUpdater.check()
appUpdater.install()
AppUpdater is an ObservableObject, can be used directly in SwiftUI.
See the AppUpdaterExample project:
Initialize, Listen: AppUpdaterExampleApp.swift
SwiftUI AppUpdaterSettings: AppUpdaterSettings.swift
Implement Custom Proxy: GithubProxy.swift
Proxy Implementation Reference Gist: github-api-proxy.js