Repository navigation
Releases
0.4.1
0.4.0
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.existingCopyInApplicationsreturns the bundle that would be replaced, ornil.SunshineUpdater.moveToApplicationsAndRelaunch(quitTimeout:)defaults to waiting 5 seconds before a force terminate.
feat: Customize the move offer
offerToMoveToApplicationsIfNeeded has new parameters:
allowsSuppressionshows or hides the "do not ask again" checkbox. The default istrue.confirmsReplacementasks before an existing copy is replaced. The default istrue. Passfalseto replace without asking.quitTimeoutis passed tomoveToApplicationsAndRelaunch(quitTimeout:).texttakes aMoveToApplicationsTextwith the titles, messages, and button labels of the alerts.
0.3.0
feat: Offer to move app to Applications
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.shouldOfferMoveToApplicationsandmoveToApplicationsAndRelaunch()are the headless equivalents.- The app is copied to
/Applications, or to~/Applicationsif 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)
SunshineErrorhas two new cases,installLocationUnsuitable(_:_:)andmoveToApplicationsFailed(underlying:). - Update error view has a Dismiss button.
- Code comments and README text rewritten for consistent style.
0.2.0
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
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.SunshineCoreproduct: 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")