Skip to content

TopScrech/AutoUpdate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoUpdate

Modern async/await macOS app updater inspired by mxcl/AppUpdater

Features

  • Swift 6 concurrency-first API
  • GitHub Releases provider out of the box
  • Semantic version comparison with prerelease support
  • Asset matching compatible with the classic naming format
    • repo-1.2.3.zip
    • repo-1.2.3.tar.gz
    • repo-v1.2.3.zip
  • Optional daily background checks via NSBackgroundActivityScheduler
  • Code-sign identity verification before install
  • Install-and-relaunch flow for in-place updates

Install

.package(url: "https://github.com/your-org/AutoUpdate.git", from: "1.0.0")

Quick start

import AutoUpdate

let updater = AppUpdater(
    owner: "your-github-owner",
    repository: "your-repo",
    allowPrereleases: false
)

Task {
    switch try await updater.prepareUpdateIfAvailable() {
    case .upToDate:
        break
        
    case .prepared(let preparedUpdate):
        try await updater.installAndRelaunch(preparedUpdate)
    }
}

Scheduled checks

Task {
    await updater.startAutomaticChecks(
        every: 24 * 60 * 60,
        installAfterPreparation: false
    )
}

About

Auto updater for macOS apps

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages