SPUStandardUserDriverDelegate
Objective-C
@protocol SPUStandardUserDriverDelegate <NSObject>
Swift
protocol SPUStandardUserDriverDelegate : NSObjectProtocol
A protocol for Sparkle’s standard user driver’s delegate
This includes methods related to UI interactions
-
Called before showing a modal alert window, to give the opportunity to hide attached windows that may get in the way.
Declaration
Objective-C
- (void)standardUserDriverWillShowModalAlert;
Swift
optional func standardUserDriverWillShowModalAlert()
-
Called after showing a modal alert window, to give the opportunity to hide attached windows that may get in the way.
Declaration
Objective-C
- (void)standardUserDriverDidShowModalAlert;
Swift
optional func standardUserDriverDidShowModalAlert()
-
Returns an object that formats version numbers for display to the user. If you don’t implement this method or return
nil,
the standard version formatter will be used.Declaration
Objective-C
- (id<SUVersionDisplay> _Nullable)standardUserDriverRequestsVersionDisplayer;
-
Handles showing the full release notes to the user.
When a user checks for new updates and no new update is found, Sparkle will offer to show the application’s version history to the user by providing a “Version History” button in the no new update available alert.
If this delegate method is not implemented, Sparkle will instead offer to open the
fullReleaseNotesLink
(orreleaseNotesLink
if the former is unavailable) from the appcast’s latestitem
in the user’s web browser.If this delegate method is implemented, Sparkle will instead ask the delegate to show the full release notes to the user. A delegate may want to implement this method if they want to show in-app or offline release notes.
Declaration
Objective-C
- (void)standardUserDriverShowVersionHistoryForAppcastItem: (SUAppcastItem *_Nonnull)item;
Swift
optional func standardUserDriverShowVersionHistory(forAppcastItem item: Any!)
Parameters
item
The appcast item corresponding to the latest version available.