From 42a9a34be48b38b65fb393c8afd7b07e53d8029b Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 6 Aug 2016 10:28:52 -0400 Subject: [PATCH] Add logging notice and some more explanation for not supporting -installUpdatesIfAvailable (yet) --- Sparkle/SUUpdater.m | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index cbc56664..71ece77e 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -17,6 +17,8 @@ @property (nonatomic, readonly) SPUUpdater *updater; @property (nonatomic, readonly) SPUStandardUserDriver *userDriver; +@property (nonatomic) BOOL loggedInstallUpdatesIfAvailableWarning; + @end @interface SPUUpdater (Private) @@ -34,6 +36,7 @@ @synthesize updater = _updater; @synthesize userDriver = _userDriver; @synthesize decryptionPassword = _decryptionPassword; +@synthesize loggedInstallUpdatesIfAvailableWarning = _loggedInstallUpdatesIfAvailableWarning; static NSMutableDictionary *sharedUpdaters = nil; @@ -250,10 +253,18 @@ static NSMutableDictionary *sharedUpdaters = nil; return nil; } -// Not implemented properly at the moment - haven't decided if it should be -// Just invoke the regular update process if this is invoked +// Not implemented properly at the moment - leaning towards it not be in the future +// because it may be hard to implement properly (without passing a boolean flag everywhere), or +// it would require us to maintain support for an additional class used by a very few people thus far +// For now, just invoke the regular update process if this is invoked. Could change our minds on this later. - (void)installUpdatesIfAvailable { + if (!self.loggedInstallUpdatesIfAvailableWarning) { + SULog(@"-[%@ installUpdatesIfAvailable] does not function anymore.. Instead a user-initiated update check will be done instead.", NSStringFromClass([self class])); + + self.loggedInstallUpdatesIfAvailableWarning = YES; + } + [self checkForUpdates:nil]; }