Documentation ¶
Overview ¶
Package winsparkle provides go bindings for WinSparkle.
Sparkle is a secure and reliable software update framework for Cocoa developers. See https://github.com/sparkle-project/Sparkle for more info.
Index ¶
- func CheckForUpdateInformation()
- func CheckForUpdates()
- func CheckForUpdatesInBackground()
- func GetAutomaticallyChecksForUpdates() bool
- func GetAutomaticallyDownloadsUpdates() bool
- func GetDecryptionPassword() string
- func GetFeedURL() string
- func GetLastUpdateCheckDate() time.Time
- func GetSendsSystemProfile() bool
- func GetUpdateCheckInterval() time.Duration
- func GetUpdateInProgress() bool
- func GetUserAgentString() string
- func InstallUpdatesIfAvailable()
- func ResetUpdateCycle()
- func SetAutomaticallyChecksForUpdates(check bool)
- func SetAutomaticallyDownloadsUpdates(check bool)
- func SetDecryptionPassword(url string)
- func SetFeedURL(url string)
- func SetSendsSystemProfile(check bool)
- func SetUpdateCheckInterval(duration time.Duration)
- func SetUserAgentString(ua string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForUpdateInformation ¶
func CheckForUpdateInformation()
Begins a "probing" check for updates which will not actually offer to update to that version.
However, the delegate methods SUUpdaterDelegate::updater:didFindValidUpdate: and SUUpdaterDelegate::updaterDidNotFindUpdate: will be called, so you can use that information in your UI.
Updates that have been skipped by the user will not be found.
func CheckForUpdates ¶
func CheckForUpdates()
Explicitly checks for updates and displays a progress dialog while doing so.
This method is meant for a main menu item. Connect any menu item to this action in Interface Builder, and Sparkle will check for updates and report back its findings verbosely when it is invoked.
This will find updates that the user has opted into skipping.
func CheckForUpdatesInBackground ¶
func CheckForUpdatesInBackground()
Checks for updates, but does not display any UI unless an update is found.
This is meant for programmatically initating a check for updates. That is, it will display no UI unless it actually finds an update, in which case it proceeds as usual.
If automatic downloading of updates it turned on and allowed, however, this will invoke that behavior, and if an update is found, it will be downloaded in the background silently and will be prepped for installation.
This will not find updates that the user has opted into skipping.
func GetAutomaticallyChecksForUpdates ¶
func GetAutomaticallyChecksForUpdates() bool
Returns whether or not to check for updates automatically.
Setting this property will persist in the host bundle's user defaults. The update schedule cycle will be reset in a short delay after the property's new value is set. This is to allow reverting this property without kicking off a schedule change immediately
func GetAutomaticallyDownloadsUpdates ¶
func GetAutomaticallyDownloadsUpdates() bool
Returns whether or not updates can be automatically downloaded in the background.
Note that automatic downloading of updates can be disallowed by the developer or by the user's system if silent updates cannot be done (eg: if they require authentication). In this case, -automaticallyDownloadsUpdates will return NO regardless of how this property is set.
func GetDecryptionPassword ¶
func GetDecryptionPassword() string
Returns the decryption password used for extracting updates shipped as Apple Disk Images (dmg)
func GetFeedURL ¶
func GetFeedURL() string
Returns the URL of the appcast used to download update information.
func GetLastUpdateCheckDate ¶
Returns the date of last update check.
func GetSendsSystemProfile ¶
func GetSendsSystemProfile() bool
Returns whether or not the user's system profile information is sent when checking for updates.
func GetUpdateCheckInterval ¶
Returns the current automatic update check interval.
func GetUpdateInProgress ¶
func GetUpdateInProgress() bool
Returns whether or not an update is in progress.
func GetUserAgentString ¶
func GetUserAgentString() string
Returns the user agent used when checking for updates.
func InstallUpdatesIfAvailable ¶
func InstallUpdatesIfAvailable()
This function ignores normal update schedule, ignores user preferences, and interrupts users with an unwanted immediate app update.
WARNING: this function should not be used in regular apps. This function is a user-unfriendly hack only for very special cases, like unstable rapidly-changing beta builds that would not run correctly if they were even one day out of date.
Instead of this function you should set `SUAutomaticallyUpdate` to `YES`, which will gracefully install updates when the app quits.
For UI-less/daemon apps that aren't usually quit, instead of this function, you can use the delegate method SUUpdaterDelegate::updater:willInstallUpdateOnQuit:immediateInstallationInvocation: or SUUpdaterDelegate::updater:willInstallUpdateOnQuit:immediateInstallationBlock: to immediately start installation when an update was found.
A progress dialog is shown but the user will never be prompted to read the release notes.
This function will cause update to be downloaded twice if automatic updates are enabled.
You may want to respond to the userDidCancelDownload delegate method in case the user clicks the "Cancel" button while the update is downloading.
func ResetUpdateCycle ¶
func ResetUpdateCycle()
Appropriately schedules or cancels the update checking timer according to the preferences for time interval and automatic checks.
This call does not change the date of the next check, but only the internal NSTimer.
func SetAutomaticallyChecksForUpdates ¶
func SetAutomaticallyChecksForUpdates(check bool)
Sets whether or not to check for updates automatically.
func SetAutomaticallyDownloadsUpdates ¶
func SetAutomaticallyDownloadsUpdates(check bool)
Sets whether or not updates can be automatically downloaded in the background.
Note that automatic downloading of updates can be disallowed by the developer or by the user's system if silent updates cannot be done (eg: if they require authentication). In this case, `sparkle.GetAutomaticallyDownloadsUpdates` will return NO regardless of how this property is set.
Setting this property will persist in the host bundle's user defaults.
func SetDecryptionPassword ¶
func SetDecryptionPassword(url string)
Sets the decryption password used for extracting updates shipped as Apple Disk Images (dmg)
func SetFeedURL ¶
func SetFeedURL(url string)
Sets the URL of the appcast used to download update information.
Setting this property will persist in the host bundle's user defaults. If you don't want persistence, you may want to consider instead implementing SUUpdaterDelegate::feedURLStringForUpdater: or SUUpdaterDelegate::feedParametersForUpdater:sendingSystemProfile:
This property must be called on the main thread.
func SetSendsSystemProfile ¶
func SetSendsSystemProfile(check bool)
Sets whether or not the user's system profile information is sent when checking for updates.
Setting this property will persist in the host bundle's user defaults.
func SetUpdateCheckInterval ¶
Sets the automatic update check interval.
Setting this property will persist in the host bundle's user defaults. The update schedule cycle will be reset in a short delay after the property's new value is set. This is to allow reverting this property without kicking off a schedule change immediately
func SetUserAgentString ¶
func SetUserAgentString(ua string)
Sets the user agent used when checking for updates.
Types ¶
This section is empty.