From 200132803209e7d986f2964c5a862bed1bc52846 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 1 Jan 2017 22:22:07 -0500 Subject: [PATCH] Add user driver docs & handling for showing informational updates Perhaps I should add another method to the user driver for showing informational updates in the near future. --- Sparkle/SPUUIBasedUpdateDriver.m | 6 +++++- Sparkle/SPUUserDriver.h | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Sparkle/SPUUIBasedUpdateDriver.m b/Sparkle/SPUUIBasedUpdateDriver.m index 32005091..13e4a804 100644 --- a/Sparkle/SPUUIBasedUpdateDriver.m +++ b/Sparkle/SPUUIBasedUpdateDriver.m @@ -131,7 +131,11 @@ [self.host setObject:nil forUserDefaultsKey:SUSkippedVersionKey]; switch (choice) { case SPUInstallUpdateChoice: - [self.coreDriver downloadUpdateFromAppcastItem:updateItem]; + if (!updateItem.isInformationOnlyUpdate) { + [self.coreDriver downloadUpdateFromAppcastItem:updateItem]; + } else { + [self.delegate uiDriverIsRequestingAbortUpdateWithError:nil]; + } break; case SPUSkipThisVersionChoice: [self.host setObject:[updateItem versionString] forUserDefaultsKey:SUSkippedVersionKey]; diff --git a/Sparkle/SPUUserDriver.h b/Sparkle/SPUUserDriver.h index 9bdd095f..9bf6ed9b 100644 --- a/Sparkle/SPUUserDriver.h +++ b/Sparkle/SPUUserDriver.h @@ -84,9 +84,9 @@ SU_EXPORT @protocol SPUUserDriver - (void)dismissUserInitiatedUpdateCheck; /*! - * Show the user a new update is found and can be downloaded & installed + * Show the user a new update is found * - * Let the user know a new downloadable update is found and ask them what they want to do. + * Let the user know a new update is found and ask them what they want to do. * * @param appcastItem The Appcast Item containing information that reflects the new update * @@ -94,6 +94,7 @@ SU_EXPORT @protocol SPUUserDriver * * @param reply * A reply of SPUInstallUpdateChoice begins downloading and installing the new update. + * Note if the update is only informational (appcastItem.isInformationOnlyUpdate), this response shouldn't be made. * * A reply of SPUInstallLaterChoice reminds the user later of the update, which can act as a "do nothing" option. *