Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified src/MacVim/Sparkle_2.framework/Versions/B/Autoupdate
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// SPUAppcastSigningValidationStatus.h
// Sparkle
//
// Created on 12/30/25.
// Copyright © 2025 Sparkle Project. All rights reserved.
//

#ifndef SPUAppcastSigningValidationStatus_h
#define SPUAppcastSigningValidationStatus_h

typedef NS_ENUM(NSInteger, SPUAppcastSigningValidationStatus)
{
/**
The bundle does not opt into requiring appcast signing and no validation of the appcast feed is done.
*/
SPUAppcastSigningValidationStatusSkipped = 0,

/**
The appcast is signed and validation has passed succesfully.
*/
SPUAppcastSigningValidationStatusSucceeded,

/**
The appcast is signed and validation has failed. In this case, appcast items operate in a 'safe' fallback mode
meaning that they cannot be marked as a critical update, cannot be marked as informational update,
and will not have any release note or link references.
*/
SPUAppcastSigningValidationStatusFailed,
};

#endif /* SPUAppcastSigningValidationStatus_h */
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* A class for containing downloaded data along with some information about it.
*/
SU_EXPORT @interface SPUDownloadData : NSObject <NSSecureCoding>
SU_EXPORT NS_SWIFT_SENDABLE @interface SPUDownloadData : NSObject <NSSecureCoding>

/**
* The raw data that was downloaded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN

This class must be used on the main thread.
*/
SU_EXPORT @interface SPUStandardUpdaterController : NSObject
SU_EXPORT NS_SWIFT_UI_ACTOR @interface SPUStandardUpdaterController : NSObject
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-interface-ivars"
Expand Down Expand Up @@ -81,6 +81,8 @@ SU_EXPORT @interface SPUStandardUpdaterController : NSObject
Create a new `SPUStandardUpdaterController` programmatically.

The updater is started automatically. See `-startUpdater` for more information.

Note the `updaterDelegate` and `userDriverDelegate` are weakly referenced, so you are responsible for keeping them alive.
*/
- (instancetype)initWithUpdaterDelegate:(nullable id<SPUUpdaterDelegate>)updaterDelegate userDriverDelegate:(nullable id<SPUStandardUserDriverDelegate>)userDriverDelegate;

Expand All @@ -89,6 +91,8 @@ SU_EXPORT @interface SPUStandardUpdaterController : NSObject

You can specify whether or not you want to start the updater immediately.
If you do not start the updater, you must invoke `-startUpdater` at a later time to start it.

Note the `updaterDelegate` and `userDriverDelegate` are weakly referenced, so you are responsible for keeping them alive.
*/
- (instancetype)initWithStartingUpdater:(BOOL)startUpdater updaterDelegate:(nullable id<SPUUpdaterDelegate>)updaterDelegate userDriverDelegate:(nullable id<SPUStandardUserDriverDelegate>)userDriverDelegate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ NS_ASSUME_NONNULL_BEGIN
/**
Sparkle's standard built-in user driver for updater interactions
*/
SU_EXPORT @interface SPUStandardUserDriver : NSObject <SPUUserDriver>
SU_EXPORT NS_SWIFT_UI_ACTOR @interface SPUStandardUserDriver : NSObject <SPUUserDriver>

/**
Initializes a Sparkle's standard user driver for user update interactions

@param hostBundle The target bundle of the host that is being updated.
@param delegate The optional delegate to this user driver.
@param delegate The optional delegate to this user driver. Note the standard user driver weakly references the delegate, so you are responsible for keeping it alive.
*/
- (instancetype)initWithHostBundle:(NSBundle *)hostBundle delegate:(nullable id<SPUStandardUserDriverDelegate>)delegate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,22 @@ SU_EXPORT @protocol SPUStandardUserDriverDelegate <NSObject>
*/
- (void)standardUserDriverWillFinishUpdateSession;

/**
Called before the standard user driver shows plain-text or markdown release notes text to the user.

The delegate has the opportunity to return a new attributed string for the release notes text that will be shown to the user.
The `bundleDisplayVersion` and `bundleVersion` are supplied in case they're useful for creating a new attributed string.

This method will not be invoked for HTML release notes. It is only applicable to plain-text and markdown release notes.

@param releaseNotesAttributedString The release notes text that the standard user driver wants to show to the user.
@param update The new update the release notes will be shown for.
@param bundleDisplayVersion The current display version (or `CFBundleShortVersionString`) of the bundle that is being updated.
@param bundleVersion The current version (or `CFBundleVersion`) of the bundle that is being updated.
@return A new attributed string for the release notes text to show, or @c nil if the `releaseNotesAttributedString` should still be used.
*/
- (NSAttributedString * _Nullable)standardUserDriverWillShowReleaseNotesText:(NSAttributedString *)releaseNotesAttributedString forUpdate:(SUAppcastItem *)update withBundleDisplayVersion:(NSString *)bundleDisplayVersion bundleVersion:(NSString *)bundleVersion;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
This class represents information needed to make a permission request for checking updates.
*/
SU_EXPORT @interface SPUUpdatePermissionRequest : NSObject<NSSecureCoding>
SU_EXPORT NS_SWIFT_SENDABLE @interface SPUUpdatePermissionRequest : NSObject<NSSecureCoding>

/**
Initializes a new update permission request instance.
Expand Down
44 changes: 27 additions & 17 deletions src/MacVim/Sparkle_2.framework/Versions/B/Headers/SPUUpdater.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN

This class must be used on the main thread.
*/
SU_EXPORT @interface SPUUpdater : NSObject
SU_EXPORT NS_SWIFT_UI_ACTOR @interface SPUUpdater : NSObject

/**
Initializes a new `SPUUpdater` instance
Expand All @@ -57,7 +57,7 @@ SU_EXPORT @interface SPUUpdater : NSObject
@param hostBundle The bundle that should be targeted for updating.
@param applicationBundle The application bundle that should be waited for termination and relaunched (unless overridden). Usually this can be the same as hostBundle. This may differ when updating a plug-in or other non-application bundle.
@param userDriver The user driver that Sparkle uses for user update interaction.
@param delegate The delegate for `SPUUpdater`.
@param delegate The delegate for `SPUUpdater`. Note the updater weakly references the delegate, so you are responsible for keeping it alive.
*/
- (instancetype)initWithHostBundle:(NSBundle *)hostBundle applicationBundle:(NSBundle *)applicationBundle userDriver:(id <SPUUserDriver>)userDriver delegate:(nullable id<SPUUpdaterDelegate>)delegate;

Expand Down Expand Up @@ -92,7 +92,7 @@ SU_EXPORT @interface SPUUpdater : NSObject
- (BOOL)startUpdater:(NSError * __autoreleasing *)error;

/**
Checks for updates, and displays progress while doing so if needed.
Checks for new updates, and displays progress while doing so if needed.

This is meant for users initiating a new update check or checking the current update progress.

Expand All @@ -109,25 +109,23 @@ SU_EXPORT @interface SPUUpdater : NSObject
- (void)checkForUpdates;

/**
Checks for updates, but does not show any UI unless an update is found.
Checks for new updates in the background.

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`. Therefore, you should typically only consider calling this method directly if you
opt out of automatic update checks. Calling this method when updating your own bundle is invalid if Sparkle is configured
to ask the user's permission to check for updates automatically and `automaticallyChecksForUpdates` is `NO`.
If you want to reset the updater's cycle after an updater setting change, see `resetUpdateCycle` or `resetUpdateCycleAfterShortDelay` instead.
You usually should not call this method directly. By default Sparkle calls this method automatically
on a scheduled basis if automatic update checks are enabled. This is done by checking the current state of
`automaticallyChecksForUpdates`, `updateCheckInterval`, `lastUpdateCheckDate`, and
`SUScheduledImpatientCheckInterval`.

This is meant for programmatically initiating 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 you want to additionally force an update check on every app launch though, it's recommended to only call this method immediately after starting the updater,
and only when automatic update checks are enabled (by checking `automaticallyChecksForUpdates` is `YES`). Calling this method at later points
could interfere with Sparkle's scheduler in unexpected ways.

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/
If you want to reset the updater's cycle after an updater setting change, please use `resetUpdateCycle` or `resetUpdateCycleAfterShortDelay` instead.

Note if automated downloading/installing 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.
Updates that are found may not be presented immediately to the user, either due to automatic downloading/installing of updates being on or
due to gentle reminders https://sparkle-project.org/documentation/gentle-reminders/ for example.

This will not find updates that the user has opted into skipping.
Updates that have been skipped by the user will not be found.

This method does not do anything if there is a `sessionInProgress`.

Expand Down Expand Up @@ -251,6 +249,18 @@ SU_EXPORT @interface SPUUpdater : NSObject
*/
@property (nonatomic) BOOL automaticallyDownloadsUpdates;

/**
A property indicating whether or not the *option* to automatically download updates in the background can be turned on.

This property can be used to determine whether an option to automatically download/install updates should be enabled.

Its value depends on `automaticallyChecksForUpdates`, or the `SUAllowsAutomaticUpdates`in the host bundle's Info.plist if specified.
Don't set `SUAllowsAutomaticUpdates` in the Info.plist unless you need custom behavior.

This property is KVO compliant. This property must be called on the main thread.
*/
@property (nonatomic, readonly) BOOL allowsAutomaticUpdates;

/**
The URL of the appcast used to download update information.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ SU_EXPORT extern NSString *const SUSystemProfilerPreferredLanguageKey;
/**
Provides delegation methods to control the behavior of an `SPUUpdater` object.
*/
@protocol SPUUpdaterDelegate <NSObject>
NS_SWIFT_UI_ACTOR @protocol SPUUpdaterDelegate <NSObject>
@optional

/**
Expand Down Expand Up @@ -421,16 +421,21 @@ SU_EXPORT extern NSString *const SUSystemProfilerPreferredLanguageKey;
/**
Called when an update is scheduled to be silently installed on quit after downloading the update automatically.

If the updater is given responsibility, it can later remind the user an update is available if they have not terminated the application for a long time.
If you want to intercept this method without taking control of installing the update, return @c NO.
This will let future update cycles to run and allow Sparkle to present the update to the user later if certain conditions are met.
For example, critical updates will be presented to the user right away. Other updates may be presented later if the user hasn't terminated the application
for a long time (defined by `SUScheduledImpatientCheckInterval`).

Also if the updater is given responsibility and the update item is marked critical, the new update will be presented to the user immediately after.
If you want to take control of installing the update, return @c YES.
This stalls the current update cycle and prevents future update cycles from running. When the opportunity arrives, you can invoke `immediateInstallHandler` to
install the update and relaunch the application without any UI interaction shown.

Even if the @c immediateInstallHandler is not invoked, the installer will attempt to install the update on termination.
In either case Sparkle will always attempt to install the update when the app terminates.

@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 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.
@param immediateInstallHandler The install handler to immediately install the update and relaunch the application. This handler can only be used if @c YES is returned. For Sparkle 2.3 onwards, this handler can be invoked multiple times in case the application cancels the termination request.
@return @c YES if you will handle installing the update using `immediateInstallHandler` or @c NO to allow Sparkle's update scheduler to continue running.
*/
- (BOOL)updater:(SPUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)item immediateInstallationBlock:(void (^)(void))immediateInstallHandler;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ NS_ASSUME_NONNULL_BEGIN

For updating updater settings, changes are made in the host's user defaults.
*/
SU_EXPORT @interface SPUUpdaterSettings : NSObject
SU_EXPORT NS_SWIFT_UI_ACTOR @interface SPUUpdaterSettings : NSObject

- (instancetype)init NS_UNAVAILABLE;

- (instancetype)initWithHostBundle:(NSBundle *)hostBundle;

Expand All @@ -48,12 +50,10 @@ SU_EXPORT @interface SPUUpdaterSettings : NSObject

/**
* 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.
*
* This property is determined by checking `automaticallyChecksForUpdates` and `allowsAutomaticUpdatesOption`.
*
* This property is KVO compliant. This property must be called on the main thread.
*/
@property (readonly, nonatomic) BOOL allowsAutomaticUpdates;

Expand All @@ -67,6 +67,25 @@ SU_EXPORT @interface SPUUpdaterSettings : NSObject
*/
@property (nonatomic) BOOL automaticallyDownloadsUpdates;

/**
* Indicates whether or not the developer allows turning on updates being automatically downloaded and installed.
* If this value is nil, the developer has not explicitly specified this option (which is the default).
*
* Please prefer to use `allowsAutomaticUpdates` instead.
*/
@property (readonly, nonatomic, nullable) NSNumber *allowsAutomaticUpdatesOption;

/**
* The impatient update check interval.
*
* If an update has already been downloaded automatically in the background, Sparkle may not notify users of the update immediately,
* and tries to install the update siliently on quit without notifying the user.
*
* Sparkle uses this long impatient update check interval to decide when to notify the user of the update if they haven't quit the app for a long time.
* By default this check interval is set to 604800 seconds (which is 1 week). This interval must be bigger than the `updateCheckInterval`.
*/
@property (nonatomic, readonly) NSTimeInterval impatientUpdateCheckInterval;

/**
* Indicates whether or not anonymous system profile information is sent when checking for updates.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN

Every method in this protocol can be assumed to be called from the main thread.
*/
SU_EXPORT @protocol SPUUserDriver <NSObject>
SU_EXPORT NS_SWIFT_UI_ACTOR @protocol SPUUserDriver <NSObject>

/**
* Show an updater permission request to the user
Expand Down Expand Up @@ -78,6 +78,8 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
*
* @c appcastItem.criticalUpdate indicates if the update is a critical update.
*
* @c appcastItem.signingValidationStatus indicates the signing validation status of the appcast, which may be applicable if appcast signing is required.
*
* A reply of `SPUUserUpdateChoiceInstall` begins or resumes downloading, extracting, or installing the update.
* If the state.stage is `SPUUserUpdateStateInstalling`, this may send a quit event to the application and relaunch it immediately (in this state, this behaves as a fast "install and Relaunch").
* If the state.stage is `SPUUpdateStateNotDownloaded` or `SPUUpdateStateDownloaded` the user may be presented an authorization prompt to install the update after `-showDownloadDidStartExtractingUpdate` is called if authorization is required for installation. For example, this may occur if the update on disk is owned by a different user (e.g. root or admin for non-admin users), or if the update is a package install.
Expand Down Expand Up @@ -138,7 +140,7 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
* @param error The error associated with why a new update was not found. See above discussion for more details.
* @param acknowledgement Acknowledge to the updater that no update found error was shown.
*/
- (void)showUpdateNotFoundWithError:(NSError *)error acknowledgement:(void (^)(void))acknowledgement;
- (void)showUpdateNotFoundWithError:(NSError *)error acknowledgement:(void (^)(void))acknowledgement NS_SWIFT_ASYNC(2);

/**
* Show the user an update error occurred
Expand All @@ -151,7 +153,7 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
* @param error The error associated with what update error occurred.
* @param acknowledgement Acknowledge to the updater that the error was shown.
*/
- (void)showUpdaterError:(NSError *)error acknowledgement:(void (^)(void))acknowledgement;
- (void)showUpdaterError:(NSError *)error acknowledgement:(void (^)(void))acknowledgement NS_SWIFT_ASYNC(2);

/**
* Show the user that downloading the new update initiated
Expand Down Expand Up @@ -254,7 +256,7 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
* @param relaunched Indicates if the update was relaunched.
* @param acknowledgement Acknowledge to the updater that the finished installation was shown.
*/
- (void)showUpdateInstalledAndRelaunched:(BOOL)relaunched acknowledgement:(void (^)(void))acknowledgement;
- (void)showUpdateInstalledAndRelaunched:(BOOL)relaunched acknowledgement:(void (^)(void))acknowledgement NS_SWIFT_ASYNC(2);

/**
* Dismiss the current update installation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ typedef NS_ENUM(NSInteger, SPUUserUpdateStage) {
/**
This represents the user's current update state.
*/
SU_EXPORT @interface SPUUserUpdateState : NSObject
SU_EXPORT NS_SWIFT_SENDABLE @interface SPUUserUpdateState : NSObject<NSSecureCoding>

- (instancetype)init NS_UNAVAILABLE;

Expand Down
11 changes: 10 additions & 1 deletion src/MacVim/Sparkle_2.framework/Versions/B/Headers/SUAppcast.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wquoted-include-in-framework-header"
#import "SUExport.h"
#import "SPUAppcastSigningValidationStatus.h"
#pragma clang diagnostic pop
#else
#import <Sparkle/SUExport.h>
#import <Sparkle/SPUAppcastSigningValidationStatus.h>
#endif

NS_ASSUME_NONNULL_BEGIN
Expand All @@ -27,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
The appcast representing a collection of `SUAppcastItem` items in the feed.
*/
SU_EXPORT @interface SUAppcast : NSObject
SU_EXPORT NS_SWIFT_SENDABLE @interface SUAppcast : NSObject

- (instancetype)init NS_UNAVAILABLE;

Expand All @@ -38,6 +40,13 @@ SU_EXPORT @interface SUAppcast : NSObject
*/
@property (readonly, nonatomic, copy) NSArray<SUAppcastItem *> *items;

/**
The appcast signing validation status.

Please see documentation of @c SPUAppcastSigningValidationStatus values for more information.
*/
@property (nonatomic, readonly) SPUAppcastSigningValidationStatus signingValidationStatus;

@end

NS_ASSUME_NONNULL_END
Expand Down
Loading
Loading