diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 12147df7..c426849b 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -436,6 +436,13 @@ if (self.download) { [self.download cancel]; } + + // Notify host app that update has aborted + id updaterDelegate = [self.updater delegate]; + if ([updaterDelegate respondsToSelector:@selector(updater:didAbortWithError:)]) { + [updaterDelegate updater:self.updater didAbortWithError:error]; + } + [self abortUpdate]; } diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h index f83fed5b..6d9c98d3 100644 --- a/Sparkle/SUUpdater.h +++ b/Sparkle/SUUpdater.h @@ -312,6 +312,14 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey; */ - (void)updater:(SUUpdater *)updater didCancelInstallUpdateOnQuit:(SUAppcastItem *)item; +/*! + Called after an update is aborted due to an error. + + \param updater The SUUpdater instance. + \param error The error that caused the abort + */ +- (void)updater:(SUUpdater *)updater didAbortWithError:(NSError *)error; + @end #endif