diff --git a/Sparkle/SPUUpdater.h b/Sparkle/SPUUpdater.h index 533d745a..ce011043 100644 --- a/Sparkle/SPUUpdater.h +++ b/Sparkle/SPUUpdater.h @@ -68,20 +68,20 @@ SU_EXPORT @interface SPUUpdater : NSObject /*! * Checks for updates, and displays progress while doing so. * - * This is meant for users initiating an update check + * This is meant for users initiating an update check. + * This may find a resumable update that has already been downloaded or has begun installing, or + * this may find a new update that can start to be downloaded if the user requests it. */ - (void)checkForUpdates; /*! * 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. + * This is meant for programmatically initating a check for updates. + * That is, it will display no UI unless it finds an update, in which case it proceeds as usual. * - * If the fully automated updating is turned on, however, this will invoke that - * behavior, and if an update is found, it will be downloaded. If possible, it will be prepped for installation without disrupting the user. - * Otherwise, the user may be alerted of the update that was just downloaded and be able to resume the installation. + * Note if there is no resumable update found, and automated updating is turned on, + * the update will be downloaded in the background without disrupting the user. */ - (void)checkForUpdatesInBackground; @@ -98,11 +98,19 @@ SU_EXPORT @interface SPUUpdater : NSObject /*! * A property indicating 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 */ @property (nonatomic) BOOL automaticallyChecksForUpdates; /*! * A property indicating the current 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 */ @property (nonatomic) NSTimeInterval updateCheckInterval; @@ -110,12 +118,19 @@ SU_EXPORT @interface SPUUpdater : NSObject * A property indicating whether or not updates can be automatically downloaded in the background. * * Note that the developer can disallow automatic downloading of updates from being enabled. + * In this case, -automaticallyDownloadsUpdates will return NO regardless of how this property is set. + * + * Setting this property will persist in the host bundle's user defaults. */ @property (nonatomic) BOOL automaticallyDownloadsUpdates; /*! * The URL of the appcast used to download update information. * + * Setting this property will persist in the host bundle's user defaults. + * To avoid this, you may want to consider instead implementing + * -[SPUUpdaterDelegate feedURLStringForUpdater:] or -[SPUUpdaterDelegate feedParametersForUpdater:sendingSystemProfile:] + * * This property must be called on the main thread. */ @property (copy) NSURL *feedURL; @@ -140,10 +155,12 @@ SU_EXPORT @interface SPUUpdater : NSObject /*! * The HTTP headers used when checking for updates. */ -@property (copy, nullable) NSDictionary *httpHeaders; +@property (copy, nullable) NSDictionary *httpHeaders; /*! * A property indicating 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. */ @property (nonatomic) BOOL sendsSystemProfile; diff --git a/Sparkle/SPUUpdaterDelegate.h b/Sparkle/SPUUpdaterDelegate.h index d09d3294..9f215366 100644 --- a/Sparkle/SPUUpdaterDelegate.h +++ b/Sparkle/SPUUpdaterDelegate.h @@ -69,6 +69,7 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey; Returns whether to allow Sparkle to pop up. For example, this may be used to prevent Sparkle from interrupting a setup assistant. + Alternatively, you may want to consider starting the updater after eg: the setup assistant finishes \param updater The updater instance. */ @@ -84,12 +85,14 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey; \return An array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user. */ -- (NSArray *)feedParametersForUpdater:(SPUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile; +- (NSArray *> *)feedParametersForUpdater:(SPUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile; /*! Returns a custom appcast URL. Override this to dynamically specify the entire URL. + Alternatively you may want to consider adding a feed parameter using -feedParametersForUpdater:sendingSystemProfile: + and having the server which appcast to serve. \param updater The updater instance. */