Skip to content

Releases

0.4.1

Choose a tag to compare

@octavore octavore released this 24 Nov 13:57
02a1a1b

Fix: update failed indicator correctly dismissed by modal.

Full Changelog: 0.4.0...0.4.1

0.4.0

Choose a tag to compare

@octavore octavore released this 21 Nov 20:11
1ecefb8

feat: Replace an existing copy when moving app to Applications

If a bundle with the same name is already in the destination folder, Sunshine now quits its runnings instances before moving it to the trash. Each instance gets terminate(), then forceTerminate() after a timeout.

  • SunshineUpdaterUIController.offerToMoveToApplicationsIfNeeded() shows a second alert before it replaces an existing copy. Cancelling leaves the current app running where it is.
  • SunshineUpdater.existingCopyInApplications returns the bundle that would be replaced, or nil.
  • SunshineUpdater.moveToApplicationsAndRelaunch(quitTimeout:) defaults to waiting 5 seconds before a force terminate.

feat: Customize the move offer

offerToMoveToApplicationsIfNeeded has new parameters:

  • allowsSuppression shows or hides the "do not ask again" checkbox. The default is true.
  • confirmsReplacement asks before an existing copy is replaced. The default is true. Pass false to replace without asking.
  • quitTimeout is passed to moveToApplicationsAndRelaunch(quitTimeout:).
  • text takes a MoveToApplicationsText with the titles, messages, and button labels of the alerts.

0.3.0

Choose a tag to compare

@octavore octavore released this 21 Nov 19:15
ece09d5

feat: Offer to move app to Applications

image

Apps cannot update themselves if opened from a disk image or read-only volume. Sunshine can now move the app to the Applications folder and relaunch it.

  • SunshineUpdaterUIController.offerToMoveToApplicationsIfNeeded() shows an alert if the apps is in an unsupported location. This should be called at launch.
  • SunshineUpdater.shouldOfferMoveToApplications and moveToApplicationsAndRelaunch() are the headless equivalents.
  • The app is copied to /Applications, or to ~/Applications if that is not writable. An existing bundle with the same name is moved to trash. The quarantine attribute is removed from the copy.

feat: Install location errors

install() now throws SunshineError.installLocationUnsuitable if the app runs from an unsupported location. The error message tells the user to move the app to the Applications folder. Previously gave a generic permissions error.

InstallLocationChecker.issue(for:) returns the InstallLocationIssue (.translocated or .readOnlyVolume) for a bundle, or nil.

Other

  • (breaking) SunshineError has two new cases, installLocationUnsuitable(_:_:) and moveToApplicationsFailed(underlying:).
  • Update error view has a Dismiss button.
  • Code comments and README text rewritten for consistent style.

0.2.0

Choose a tag to compare

@octavore octavore released this 27 Sep 18:22
7c5025a

feat: Notifications

Sunshine now creates native macOS notifications for new updates and update success/failures. This feature can be toggled on/off individually for each notification type.

SunshineConfiguration(
    owner: "acme",
    repo: "myapp",
    notifyOnSuccessfulUpdate: true,   // "<App> updated"
    notifyOnUpdateAvailable: true,    // "<App> update available"
    notifyOnUpdateFailure: true,      // "<App> update failed"
)

Fixes

  • lists now render correctly in changelogs

Full Changelog: 0.1.0...0.2.0

0.1.0

Choose a tag to compare

@octavore octavore released this 16 Sep 18:17
ffd95c2

First release of Sunshine, an auto-update library for macOS apps distributed through GitHub Releases.

Highlights

  • Checks GitHub Releases, with stable and prerelease channels and semantic version comparison.
  • Verifies the code signature, Team ID, and notarization before installing.
  • Swaps the app bundle after the app exits, relaunches it, and restores the old version if the relaunch fails.
  • Checks automatically in the background and offers manual, auto-download, and fully automatic modes.
  • Sunshine: SwiftUI update sheet, corner indicator, menu command, and settings pane.
  • SunshineCore product: engine only, with no UI dependency, reporting progress through an event stream or a delegate.

Requirements

macOS 13+, Swift 6.0+. The app must be Developer ID signed, notarized, and not sandboxed.

.package(url: "https://github.com/octavore/sunshine.git", from: "0.1.0")