forked from mirror/smcFanControl
Update Sparkle to https://github.com/sparkle-project/Sparkle/releases/tag/2.3.0
This commit is contained in:
@ -6,14 +6,7 @@
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_SPARKLE_DOWNLOADER_SERVICE
|
||||
// Ignore incorrect warning
|
||||
|
||||
@ -6,14 +6,7 @@
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SUExport.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@ -38,6 +31,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
SU_EXPORT @interface SPUStandardUpdaterController : NSObject
|
||||
{
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wobjc-interface-ivars"
|
||||
/**
|
||||
* Interface builder outlet for the updater's delegate.
|
||||
*/
|
||||
@ -47,6 +42,7 @@ SU_EXPORT @interface SPUStandardUpdaterController : NSObject
|
||||
* Interface builder outlet for the user driver's delegate.
|
||||
*/
|
||||
IBOutlet __weak id<SPUStandardUserDriverDelegate> userDriverDelegate;
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -6,14 +6,7 @@
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SPUUserDriver.h>
|
||||
#import <Sparkle/SUExport.h>
|
||||
|
||||
|
||||
@ -6,17 +6,14 @@
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SUExport.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol SUVersionDisplay;
|
||||
@class SUAppcastItem;
|
||||
@class SPUUserUpdateState;
|
||||
|
||||
/**
|
||||
A protocol for Sparkle's standard user driver's delegate
|
||||
@ -59,6 +56,117 @@ SU_EXPORT @protocol SPUStandardUserDriverDelegate <NSObject>
|
||||
|
||||
@param item The appcast item corresponding to the latest version available.
|
||||
*/
|
||||
- (void)standardUserDriverShowVersionHistoryForAppcastItem:(SUAppcastItem *_Nonnull)item;
|
||||
- (void)standardUserDriverShowVersionHistoryForAppcastItem:(SUAppcastItem *)item;
|
||||
|
||||
/**
|
||||
Specifies whether or not the download, extraction, and installing status windows allows to be minimized.
|
||||
|
||||
By default, the status window showing the current status of the update (download, extraction, ready to install) is allowed to be minimized
|
||||
for regular application bundle updates.
|
||||
|
||||
@return @c YES if the status window is allowed to be minimized (default behavior), otherwise @c NO.
|
||||
*/
|
||||
- (BOOL)standardUserDriverAllowsMinimizableStatusWindow;
|
||||
|
||||
/**
|
||||
Declares whether or not gentle scheduled update reminders are supported.
|
||||
|
||||
The delegate may implement scheduled update reminders that are presented in a gentle manner by implementing one or both of:
|
||||
`-standardUserDriverWillHandleShowingUpdate:forUpdate:state:` and `-standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:`
|
||||
|
||||
Visit https://sparkle-project.org/documentation/gentle-reminders for more information and examples.
|
||||
|
||||
@return @c YES if gentle scheduled update reminders are implemented by standard user driver delegate, otherwise @c NO (default).
|
||||
*/
|
||||
@property (nonatomic, readonly) BOOL supportsGentleScheduledUpdateReminders;
|
||||
|
||||
/**
|
||||
Specifies if the standard user driver should handle showing a new scheduled update, or if its delegate should handle showing the update instead.
|
||||
|
||||
If you implement this method and return @c NO the delegate is then responsible for showing the update,
|
||||
which must be implemented and done in `-standardUserDriverWillHandleShowingUpdate:forUpdate:state:`
|
||||
The motivation for the delegate being responsible for showing updates is to override Sparkle's default behavior
|
||||
and add gentle reminders for new updates.
|
||||
|
||||
Returning @c YES is the default behavior and allows the standard user driver to handle showing the update.
|
||||
|
||||
If the standard user driver handles showing the update, `immediateFocus` reflects whether or not it will show the update in immediate and utmost focus.
|
||||
The standard user driver may choose to show the update in immediate and utmost focus when the app was launched recently
|
||||
or the system has been idle for some time.
|
||||
|
||||
If `immediateFocus` is @c NO the standard user driver may want to defer showing the update until the user comes back to the app.
|
||||
For background running applications, when `immediateFocus` is @c NO the standard user driver will always want to show
|
||||
the update alert immediately, but behind other running applications or behind the app's own windows if it's currently active.
|
||||
|
||||
There should be no side effects made when implementing this method so you should just return @c YES or @c NO
|
||||
You will also want to implement `-standardUserDriverWillHandleShowingUpdate:forUpdate:state:` for adding additional update reminders.
|
||||
|
||||
This method is not called for user-initiated update checks. The standard user driver always handles those.
|
||||
|
||||
Visit https://sparkle-project.org/documentation/gentle-reminders for more information and examples.
|
||||
|
||||
@param update The update the standard user driver should show.
|
||||
@param immediateFocus If @c immediateFocus is @c YES, then the standard user driver proposes to show the update in immediate and utmost focus. See discussion for more details.
|
||||
|
||||
@return @c YES if the standard user should handle showing the scheduled update (default behavior), otherwise @c NO if the delegate handles showing it.
|
||||
*/
|
||||
- (BOOL)standardUserDriverShouldHandleShowingScheduledUpdate:(SUAppcastItem *)update andInImmediateFocus:(BOOL)immediateFocus;
|
||||
|
||||
/**
|
||||
Called before an update will be shown to the user.
|
||||
|
||||
If the standard user driver handles showing the update, `handleShowingUpdate` will be `YES`.
|
||||
Please see `-standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:` for how the standard user driver
|
||||
may handle showing scheduled updates when `handleShowingUpdate` is `YES` and `state.userInitiated` is `NO`.
|
||||
|
||||
If the delegate declared it handles showing the update by returning @c NO in `-standardUserDriverShouldHandleShowingScheduledUpdate:andInImmediateFocus:`
|
||||
then the delegate should handle showing update reminders in this method, or at some later point.
|
||||
In this case, `handleShowingUpdate` will be @c NO.
|
||||
To bring the update alert in focus, you may call `-[SPUStandardUpdaterController checkForUpdates:]` or `-[SPUUpdater checkForUpdates]`.
|
||||
You may want to show additional UI indicators in your application that will show this update in focus
|
||||
and want to dismiss additional UI indicators in `-standardUserDriverWillFinishUpdateSession` or `-standardUserDriverDidReceiveUserAttentionForUpdate:`
|
||||
|
||||
If `state.userInitiated` is @c YES then the standard user driver always handles showing the new update and `handleShowingUpdate` will be @c YES.
|
||||
In this case, it may still be useful for the delegate to intercept this method right before a new update will be shown.
|
||||
|
||||
This method is not called when bringing an update that has already been presented back in focus.
|
||||
|
||||
Visit https://sparkle-project.org/documentation/gentle-reminders for more information and examples.
|
||||
|
||||
@param handleShowingUpdate @c YES if the standard user driver handles showing the update, otherwise @c NO if the delegate handles showing the update.
|
||||
@param update The update that will be shown.
|
||||
@param state The user state of the update which includes if the update check was initiated by the user.
|
||||
*/
|
||||
- (void)standardUserDriverWillHandleShowingUpdate:(BOOL)handleShowingUpdate forUpdate:(SUAppcastItem *)update state:(SPUUserUpdateState *)state;
|
||||
|
||||
/**
|
||||
Called when a new update first receives attention from the user.
|
||||
|
||||
This occurs either when the user first brings the update alert in utmost focus or when the user makes a choice to install an update or dismiss/skip it.
|
||||
|
||||
This may be useful to intercept for dismissing custom attention-based UI indicators (e.g, user notifications) introduced when implementing
|
||||
`-standardUserDriverWillHandleShowingUpdate:forUpdate:state:`
|
||||
|
||||
For custom UI indicators that need to still be on screen after the user has started to install an update, please see `-standardUserDriverWillFinishUpdateSession`.
|
||||
|
||||
@param update The new update that the user gave attention to.
|
||||
*/
|
||||
- (void)standardUserDriverDidReceiveUserAttentionForUpdate:(SUAppcastItem *)update;
|
||||
|
||||
/**
|
||||
Called before the standard user driver session will finish its current update session.
|
||||
|
||||
This may occur after the user has dismissed / skipped a new update or after an update error has occurred.
|
||||
For updaters updating external/other bundles, this may also be called after an update has been successfully installed.
|
||||
|
||||
This may be useful to intercept for dismissing custom UI indicators introduced when implementing
|
||||
`-standardUserDriverWillHandleShowingUpdate:forUpdate:state:`
|
||||
|
||||
For UI indicators that need to be dismissed when the user has given attention to a new update alert,
|
||||
please see `-standardUserDriverDidReceiveUserAttentionForUpdate:`
|
||||
*/
|
||||
- (void)standardUserDriverWillFinishUpdateSession;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@ -6,14 +6,7 @@
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SUExport.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@ -6,14 +6,7 @@
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SUExport.h>
|
||||
#import <Sparkle/SPUUserDriver.h>
|
||||
|
||||
@ -32,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
Prefer to set initial properties in your bundle's Info.plist as described in [Customizing Sparkle](https://sparkle-project.org/documentation/customization/).
|
||||
|
||||
Otherwise only if you need dynamic behavior (eg. for user preferences) should you set properties on the updater such as:
|
||||
Otherwise only if you need dynamic behavior for user settings should you set properties on the updater such as:
|
||||
- `automaticallyChecksForUpdates`
|
||||
- `updateCheckInterval`
|
||||
- `automaticallyDownloadsUpdates`
|
||||
@ -102,19 +95,24 @@ SU_EXPORT @interface SPUUpdater : NSObject
|
||||
- (void)checkForUpdates;
|
||||
|
||||
/**
|
||||
Checks for updates, but does not display any UI unless an update is found.
|
||||
Checks for updates, but does not show any UI unless an update is found.
|
||||
|
||||
You usually do not need to call this method directly. If `automaticallyChecksForUpdates` is @c YES,
|
||||
Sparkle calls this method automatically according to its update schedule using the `updateCheckInterval`
|
||||
and the `lastUpdateCheckDate`.
|
||||
and the `lastUpdateCheckDate`. Therefore, you should typically only consider calling this method directly if you
|
||||
opt out of automatic update checks.
|
||||
|
||||
This is meant for programmatically initating a check for updates in the background without the user initiating it.
|
||||
This check will not show UI if no new updates are found.
|
||||
|
||||
If a new update is found, the updater's user driver may handle showing it at an appropriate (but not necessarily immediate) time.
|
||||
If you want control over when and how a new update is shown, please see https://sparkle-project.org/documentation/gentle-reminders/
|
||||
|
||||
Note if automated updating is turned on, either a new update may be downloaded in the background to be installed silently,
|
||||
or an already downloaded update may be shown.
|
||||
|
||||
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.
|
||||
This will not find updates that the user has opted into skipping.
|
||||
|
||||
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.
|
||||
|
||||
This method does not do anything if there is a `sessionInProgress`.
|
||||
*/
|
||||
- (void)checkForUpdatesInBackground;
|
||||
@ -177,7 +175,11 @@ SU_EXPORT @interface SPUUpdater : NSObject
|
||||
this permission request is not performed however.
|
||||
|
||||
Setting this property will persist in the host bundle's user defaults.
|
||||
Only set this property if you need dynamic behavior (e.g. user preferences).
|
||||
Hence developers shouldn't maintain an additional user default for this property.
|
||||
Only set this property if the user wants to change the default via a user settings option.
|
||||
Do not always set it on launch unless you want to ignore the user's preference.
|
||||
For testing environments, you can disable update checks by passing `-SUEnableAutomaticChecks NO`
|
||||
to your app's command line arguments instead of setting this property.
|
||||
|
||||
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
|
||||
@ -187,9 +189,12 @@ SU_EXPORT @interface SPUUpdater : NSObject
|
||||
/**
|
||||
A property indicating the current automatic update check interval in seconds.
|
||||
|
||||
Prefer to set SUScheduledCheckInterval directly in your Info.plist for setting the initial value.
|
||||
|
||||
Setting this property will persist in the host bundle's user defaults.
|
||||
For this reason, only set this property if you need dynamic behavior (eg user preferences).
|
||||
Otherwise prefer to set SUScheduledCheckInterval directly in your Info.plist.
|
||||
Hence developers shouldn't maintain an additional user default for this property.
|
||||
Only set this property if the user wants to change the default via a user settings option.
|
||||
Do not always set it on launch unless you want to ignore the user's preference.
|
||||
|
||||
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
|
||||
@ -201,12 +206,15 @@ SU_EXPORT @interface SPUUpdater : NSObject
|
||||
|
||||
By default, updates are not automatically downloaded.
|
||||
|
||||
Note that the developer can disallow automatic downloading of updates from being enabled.
|
||||
Note that the developer can disallow automatic downloading of updates from being enabled (via `SUAllowsAutomaticUpdates` Info.plist key).
|
||||
In this case, this property will return NO regardless of how this property is set.
|
||||
|
||||
Prefer to set SUAutomaticallyUpdate directly in your Info.plist for setting the initial value.
|
||||
|
||||
Setting this property will persist in the host bundle's user defaults.
|
||||
For this reason, only set this property if you need dynamic behavior (eg user preferences).
|
||||
Otherwise prefer to set SUAutomaticallyUpdate directly in your Info.plist.
|
||||
Hence developers shouldn't maintain an additional user default for this property.
|
||||
Only set this property if the user wants to change the default via a user settings option.
|
||||
Do not always set it on launch unless you want to ignore the user's preference.
|
||||
*/
|
||||
@property (nonatomic) BOOL automaticallyDownloadsUpdates;
|
||||
|
||||
@ -218,6 +226,9 @@ SU_EXPORT @interface SPUUpdater : NSObject
|
||||
Otherwise the feed URL in the host bundle's Info.plist will be returned.
|
||||
If no feed URL can be retrieved, returns nil.
|
||||
|
||||
For setting a primary feed URL, please set the `SUFeedURL` property in your Info.plist.
|
||||
For setting an alternative feed URL, please prefer `-[SPUUpdaterDelegate feedURLStringForUpdater:]` over `-setFeedURL:`
|
||||
|
||||
This property must be called on the main thread; calls from background threads will return nil.
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSURL *feedURL;
|
||||
@ -281,7 +292,7 @@ SU_EXPORT @interface SPUUpdater : NSObject
|
||||
@property (nonatomic, readonly, copy, nullable) NSDate *lastUpdateCheckDate;
|
||||
|
||||
/**
|
||||
Appropriately schedules or cancels the update checking timer according to the preferences for time interval and automatic checks.
|
||||
Appropriately schedules or cancels the update checking timer according to the settings for the time interval and automatic checks.
|
||||
|
||||
If you change the `updateCheckInterval` or `automaticallyChecksForUpdates` properties, the update cycle will be reset automatically after a short delay.
|
||||
The update cycle is also started automatically after the updater is started. In all these cases, this method should not be called directly.
|
||||
|
||||
@ -6,19 +6,13 @@
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SUExport.h>
|
||||
#import <Sparkle/SPUUpdateCheck.h>
|
||||
#import <Sparkle/SPUUserUpdateState.h>
|
||||
|
||||
@protocol SUVersionComparison;
|
||||
@class SPUUpdater, SUAppcast, SUAppcastItem;
|
||||
@class SPUUpdater, SUAppcast, SUAppcastItem, SPUUserUpdateState;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@ -243,12 +237,23 @@ SU_EXPORT extern NSString *const SUSystemProfilerPreferredLanguageKey;
|
||||
- (BOOL)updater:(SPUUpdater *)updater shouldProceedWithUpdate:(SUAppcastItem *)updateItem updateCheck:(SPUUpdateCheck)updateCheck error:(NSError * __autoreleasing *)error;
|
||||
|
||||
/**
|
||||
Called when an update is skipped by the user.
|
||||
Called when a user makes a choice to install, dismiss, or skip an update.
|
||||
|
||||
If the @c choice is `SPUUserUpdateChoiceDismiss` and @c state.stage is `SPUUserUpdateStageDownloaded` the downloaded update is kept
|
||||
around until the next time Sparkle reminds the user of the update.
|
||||
|
||||
If the @c choice is `SPUUserUpdateChoiceDismiss` and @c state.stage is `SPUUserUpdateStageInstalling` the update is still set to install on application termination.
|
||||
|
||||
If the @c choice is `SPUUserUpdateChoiceSkip` the user will not be reminded in the future for this update unless they initiate an update check themselves.
|
||||
|
||||
If @c updateItem.isInformationOnlyUpdate is @c YES the @c choice cannot be `SPUUserUpdateChoiceInstall`.
|
||||
|
||||
@param updater The updater instance.
|
||||
@param item The appcast item corresponding to the update that the user skipped.
|
||||
@param choice The choice (install, dismiss, or skip) the user made for this @c updateItem
|
||||
@param updateItem The appcast item corresponding to the update that the user made a choice on.
|
||||
@param state The current state for the update which includes if the update has already been downloaded or already installing.
|
||||
*/
|
||||
- (void)updater:(SPUUpdater *)updater userDidSkipThisVersion:(SUAppcastItem *)item;
|
||||
- (void)updater:(SPUUpdater *)updater userDidMakeChoice:(SPUUserUpdateChoice)choice forUpdate:(SUAppcastItem *)updateItem state:(SPUUserUpdateState *)state;
|
||||
|
||||
/**
|
||||
Returns whether the release notes (if available) should be downloaded after an update is found and shown.
|
||||
@ -409,7 +414,7 @@ SU_EXPORT extern NSString *const SUSystemProfilerPreferredLanguageKey;
|
||||
|
||||
@param updater The updater instance.
|
||||
@param item The appcast item corresponding to the update that is proposed to be installed.
|
||||
@param immediateInstallHandler The install handler to immediately install the update. No UI interaction will be shown and the application will be relaunched after installation.
|
||||
@param immediateInstallHandler The install handler for the delegate to immediately install the update. No UI interaction will be shown and the application will be relaunched after installation. This handler can only be used if @c YES is returned and the delegate handles installing the update. For Sparkle 2.3 onwards, this handler can be invoked multiple times in case the application cancels the termination request.
|
||||
@return @c YES if the delegate will handle installing the update or @c NO if the updater should be given responsibility.
|
||||
*/
|
||||
- (BOOL)updater:(SPUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)item immediateInstallationBlock:(void (^)(void))immediateInstallHandler;
|
||||
@ -453,6 +458,8 @@ SU_EXPORT extern NSString *const SUSystemProfilerPreferredLanguageKey;
|
||||
|
||||
- (BOOL)updaterMayCheckForUpdates:(SPUUpdater *)updater __deprecated_msg("Please use -[SPUUpdaterDelegate updater:mayPerformUpdateCheck:error:] instead.");
|
||||
|
||||
- (void)updater:(SPUUpdater *)updater userDidSkipThisVersion:(SUAppcastItem *)item __deprecated_msg("Please use -[SPUUpdaterDelegate updater:userDidMakeChoice:forUpdate:state:] instead.");
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@ -6,14 +6,7 @@
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SUExport.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@ -38,6 +31,12 @@ SU_EXPORT @interface SPUUpdaterSettings : NSObject
|
||||
*/
|
||||
@property (readonly, nonatomic) NSTimeInterval updateCheckInterval;
|
||||
|
||||
/**
|
||||
* Indicates whether or not automatically downloading updates is allowed to be turned on by the user.
|
||||
* If this value is nil, the developer has not explicitly specified this option.
|
||||
*/
|
||||
@property (readonly, nonatomic, nullable) NSNumber *allowsAutomaticUpdatesOption;
|
||||
|
||||
/**
|
||||
* Indicates whether or not automatically downloading updates is allowed to be turned on by the user.
|
||||
*/
|
||||
|
||||
@ -6,14 +6,7 @@
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#import <Sparkle/SPUUserUpdateState.h>
|
||||
#import <Sparkle/SUExport.h>
|
||||
@ -226,8 +219,13 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
|
||||
* If the application hasn't been terminated, a quit event is sent to the running application before installing the update.
|
||||
* If the application or user delays or cancels termination, there may be an indefinite period of time before the application fully quits.
|
||||
* It is up to the implementor whether or not to decide to continue showing installation progress in this case.
|
||||
*
|
||||
* @param retryTerminatingApplication This handler gives a chance for the application to re-try sending a quit event to the running application before installing the update.
|
||||
* The application may cancel or delay termination. This handler gives the user driver another chance to allow the user to try terminating the application again.
|
||||
* If the application does not delay or cancel application termination, there is no need to invoke this handler. This handler may be invoked multiple times.
|
||||
* Note this handler should not be invoked if @c applicationTerminated is already @c YES
|
||||
*/
|
||||
- (void)showInstallingUpdateWithApplicationTerminated:(BOOL)applicationTerminated;
|
||||
- (void)showInstallingUpdateWithApplicationTerminated:(BOOL)applicationTerminated retryTerminatingApplication:(void (^)(void))retryTerminatingApplication;
|
||||
|
||||
/**
|
||||
* Show the user that the update installation finished
|
||||
@ -238,7 +236,7 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
|
||||
* the updater's lifetime is tied to the application it is updating. This implementation must not try to reference
|
||||
* the old bundle prior to the installation, which will no longer be around.
|
||||
*
|
||||
* Before this point, `-showInstallingUpdateWithApplicationTerminated:` will be called.
|
||||
* Before this point, `-showInstallingUpdateWithApplicationTerminated:retryTerminatingApplication:` will be called.
|
||||
*
|
||||
* @param relaunched Indicates if the update was relaunched.
|
||||
* @param acknowledgement Acknowledge to the updater that the finished installation was shown.
|
||||
@ -278,9 +276,11 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
|
||||
|
||||
- (void)dismissUserInitiatedUpdateCheck __deprecated_msg("Transition to new UI appropriately when a new update is shown, when no update is found, or when an update error occurs.");
|
||||
|
||||
- (void)showInstallingUpdate __deprecated_msg("Implement -showInstallingUpdateWithApplicationTerminated: instead.");
|
||||
- (void)showInstallingUpdate __deprecated_msg("Implement -showInstallingUpdateWithApplicationTerminated:retryTerminatingApplication: instead.");
|
||||
|
||||
- (void)showSendingTerminationSignal __deprecated_msg("Implement -showInstallingUpdateWithApplicationTerminated: instead.");
|
||||
- (void)showSendingTerminationSignal __deprecated_msg("Implement -showInstallingUpdateWithApplicationTerminated:retryTerminatingApplication: instead.");
|
||||
|
||||
- (void)showInstallingUpdateWithApplicationTerminated:(BOOL)applicationTerminated __deprecated_msg("Implement -showInstallingUpdateWithApplicationTerminated:retryTerminatingApplication: instead.");;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@ -9,14 +9,7 @@
|
||||
#ifndef SPUUserUpdateState_h
|
||||
#define SPUUserUpdateState_h
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#import <Sparkle/SUExport.h>
|
||||
|
||||
|
||||
@ -9,14 +9,7 @@
|
||||
#ifndef SUAPPCAST_H
|
||||
#define SUAPPCAST_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SUExport.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@ -9,14 +9,7 @@
|
||||
#ifndef SUAPPCASTITEM_H
|
||||
#define SUAPPCASTITEM_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_SPARKLE_TESTS
|
||||
// Ignore incorrect warning
|
||||
@ -28,9 +21,6 @@
|
||||
#import <Sparkle/SUExport.h>
|
||||
#endif
|
||||
|
||||
@class SUSignatures;
|
||||
@class SPUAppcastItemState;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
@ -65,8 +55,10 @@ SU_EXPORT @interface SUAppcastItem : NSObject<NSSecureCoding>
|
||||
This corresponds to the application update's @c CFBundleShortVersionString
|
||||
|
||||
This is extracted from the @c <sparkle:shortVersionString> element, or the @c sparkle:shortVersionString attribute from the @c <enclosure> element.
|
||||
|
||||
If no short version string is available, this falls back to the update's `versionString`.
|
||||
*/
|
||||
@property (copy, readonly, nullable) NSString *displayVersionString;
|
||||
@property (copy, readonly) NSString *displayVersionString;
|
||||
|
||||
/**
|
||||
The file URL to the update item if provided.
|
||||
@ -179,7 +171,7 @@ SU_EXPORT @interface SUAppcastItem : NSObject<NSSecureCoding>
|
||||
|
||||
This version string should contain three period-separated components.
|
||||
|
||||
Example: @c 10.12.0
|
||||
Example: @c 10.13.0
|
||||
|
||||
Use `minimumOperatingSystemVersionIsOK` property to test if the current running system passes this requirement.
|
||||
|
||||
@ -199,7 +191,7 @@ SU_EXPORT @interface SUAppcastItem : NSObject<NSSecureCoding>
|
||||
|
||||
This version string should contain three period-separated components.
|
||||
|
||||
Example: @c 10.13.0
|
||||
Example: @c 10.14.0
|
||||
|
||||
Use `maximumOperatingSystemVersionIsOK` property to test if the current running system passes this requirement.
|
||||
|
||||
@ -341,6 +333,29 @@ SU_EXPORT @interface SUAppcastItem : NSObject<NSSecureCoding>
|
||||
*/
|
||||
@property (copy, readonly, nullable) NSDictionary<NSString *, SUAppcastItem *> *deltaUpdates;
|
||||
|
||||
/**
|
||||
The expected size of the Sparkle executable file before applying this delta update.
|
||||
|
||||
This attribute is used to test if the delta item can still be applied. If Sparkle's executable file has changed (e.g. from having an architecture stripped),
|
||||
then the delta item cannot be applied.
|
||||
|
||||
This is extracted from the @c sparkle:deltaFromSparkleExecutableSize attribute from the @c <enclosure> element of a @c sparkle:deltas item.
|
||||
This attribute is optional for delta update items.
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSNumber *deltaFromSparkleExecutableSize;
|
||||
|
||||
/**
|
||||
An expected set of Sparkle's locales present on disk before applying this delta update.
|
||||
|
||||
This attribute is used to test if the delta item can still be applied. If Sparkle's list of locales present on disk (.lproj directories) do not contain any items from this set,
|
||||
(e.g. from having localization files stripped) then the delta item cannot be applied. This set does not need to be a complete list of locales. Sparkle may even decide
|
||||
to not process all them. 1-10 should be a decent amount.
|
||||
|
||||
This is extracted from the @c sparkle:deltaFromSparkleLocales attribute from the @c <enclosure> element of a @c sparkle:deltas item.
|
||||
The locales extracted from this attribute are delimited by a comma (e.g. "en,ca,fr,hr,hu"). This attribute is optional for delta update items.
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSSet<NSString *> *deltaFromSparkleLocales;
|
||||
|
||||
/**
|
||||
Indicates whether or not the update item is a delta update.
|
||||
|
||||
|
||||
@ -9,14 +9,7 @@
|
||||
#ifndef SUERRORS_H
|
||||
#define SUERRORS_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#if defined(BUILDING_SPARKLE_TOOL) || defined(BUILDING_SPARKLE_TESTS)
|
||||
// Ignore incorrect warning
|
||||
@ -73,6 +66,8 @@ typedef NS_ENUM(OSStatus, SUError) {
|
||||
SUInstallationAuthorizeLaterError = 4008,
|
||||
SUNotValidUpdateError = 4009,
|
||||
SUAgentInvalidationError = 4010,
|
||||
SUInstallationRootInteractiveError = 4011,
|
||||
SUInstallationWriteNoPermissionError = 4012,
|
||||
|
||||
// API misuse errors.
|
||||
SUIncorrectAPIUsageError = 5000
|
||||
|
||||
@ -9,14 +9,7 @@
|
||||
#ifndef SUSTANDARDVERSIONCOMPARATOR_H
|
||||
#define SUSTANDARDVERSIONCOMPARATOR_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_SPARKLE_TOOL
|
||||
// Ignore incorrect warning
|
||||
|
||||
@ -6,14 +6,7 @@
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SUExport.h>
|
||||
|
||||
/**
|
||||
|
||||
@ -9,14 +9,7 @@
|
||||
#ifndef SUUPDATER_H
|
||||
#define SUUPDATER_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SUExport.h>
|
||||
#import <Sparkle/SUVersionComparisonProtocol.h>
|
||||
#import <Sparkle/SUVersionDisplayProtocol.h>
|
||||
|
||||
@ -6,14 +6,7 @@
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SUExport.h>
|
||||
|
||||
@protocol SUVersionComparison, SUVersionDisplay;
|
||||
@ -127,6 +120,23 @@ __deprecated_msg("Deprecated in Sparkle 2. See SPUUpdaterDelegate instead")
|
||||
*/
|
||||
- (void)updaterDidNotFindUpdate:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Called just before the scheduled update driver prompts the user to install an update.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
|
||||
\return YES to allow the update prompt to be shown (the default behavior), or NO to suppress it.
|
||||
*/
|
||||
- (BOOL)updaterShouldShowUpdateAlertForScheduledUpdate:(SUUpdater *)updater forItem:(SUAppcastItem *)item;
|
||||
|
||||
/*!
|
||||
Called after the user dismisses the update alert.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param permanently YES if the alert will not appear again for this update; NO if it may reappear.
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater didDismissUpdateAlertPermanently:(BOOL)permanently forItem:(SUAppcastItem *)item;
|
||||
|
||||
/*!
|
||||
Called immediately before downloading the specified update.
|
||||
|
||||
|
||||
@ -9,14 +9,7 @@
|
||||
#ifndef SUVERSIONCOMPARISONPROTOCOL_H
|
||||
#define SUVERSIONCOMPARISONPROTOCOL_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_SPARKLE_TOOL
|
||||
// Ignore incorrect warning
|
||||
|
||||
@ -6,14 +6,7 @@
|
||||
// Copyright 2009 Elgato Systems GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
#if __has_warning("-Watimport-in-framework-header")
|
||||
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
|
||||
#endif
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import <Sparkle/SUExport.h>
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user