From b3afccee9db762d73b742faa1ec59e1a22444b61 Mon Sep 17 00:00:00 2001 From: Marcus Osobase Date: Tue, 3 May 2016 15:56:09 -0400 Subject: [PATCH] Allow delegate to decide how to proceed with new update --- Sparkle/SUUpdater.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h index 5a0217c8..bfe3d06b 100644 --- a/Sparkle/SUUpdater.h +++ b/Sparkle/SUUpdater.h @@ -60,6 +60,9 @@ SU_EXPORT @interface SUUpdater : NSObject */ - (instancetype)initForBundle:(NSBundle *)bundle; + +@property (nonatomic) BOOL suppressUI; + /*! Suppress sparkle UI. This should prevent any Sparkle UI from popping up. Updates should be handled by the host. @@ -119,6 +122,16 @@ SU_EXPORT @interface SUUpdater : NSObject */ @property BOOL automaticallyDownloadsUpdates; +/*! + Called when a valid update is found by the update driver and provides delegate ability to respond. + + \param updater The SUUpdater instance. + \param item The appcast item corresponding to the update that is proposed to be installed. + \param responseBlock The block carrying the users response to update. +*/ +- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)item respondWithChoice:(void (^)(SUDUpdateAlertChoice))responseBlock; + + /*! A property indicating the current automatic update check interval.