diff --git a/Sparkle/SPUStandardUserDriver.m b/Sparkle/SPUStandardUserDriver.m index b9c3ed0f..1256d26c 100644 --- a/Sparkle/SPUStandardUserDriver.m +++ b/Sparkle/SPUStandardUserDriver.m @@ -217,11 +217,11 @@ #pragma mark Check for Updates -- (void)showUserInitiatedUpdateCheckWithCompletion:(void (^)(SPUUserInitiatedCheckStatus))updateCheckStatusCompletion +- (void)showUserInitiatedUpdateCheckWithCancellation:(void (^)(void))cancellation { assert(NSThread.isMainThread); - [self.coreComponent registerUpdateCheckStatusHandler:updateCheckStatusCompletion]; + [self.coreComponent registerCancellation:cancellation]; self.checkingController = [[SUStatusController alloc] initWithHost:self.host]; [[self.checkingController window] center]; // Force the checking controller to load its window. @@ -248,7 +248,7 @@ - (void)cancelCheckForUpdates:(id)__unused sender { - [self.coreComponent cancelUpdateCheckStatus]; + [self.coreComponent cancel]; [self closeCheckingWindow]; } @@ -256,7 +256,7 @@ { assert(NSThread.isMainThread); - [self.coreComponent completeUpdateCheckStatus]; + [self.coreComponent clearCancellation]; [self closeCheckingWindow]; } @@ -320,11 +320,11 @@ } } -- (void)showDownloadInitiatedWithCompletion:(void (^)(SPUDownloadUpdateStatus))downloadUpdateStatusCompletion +- (void)showDownloadInitiatedWithCancellation:(void (^)(void))cancellation { assert(NSThread.isMainThread); - [self.coreComponent registerDownloadStatusHandler:downloadUpdateStatusCompletion]; + [self.coreComponent registerCancellation:cancellation]; [self showStatusController]; [self.statusController beginActionWithTitle:SULocalizedString(@"Downloading update...", @"Take care not to overflow the status window.") maxProgressValue:0.0 statusText:nil]; @@ -333,7 +333,7 @@ - (void)cancelDownload:(id)__unused sender { - [self.coreComponent cancelDownloadStatus]; + [self.coreComponent cancel]; } - (void)showDownloadDidReceiveExpectedContentLength:(uint64_t)expectedContentLength @@ -395,7 +395,7 @@ { assert(NSThread.isMainThread); - [self.coreComponent completeDownloadStatus]; + [self.coreComponent clearCancellation]; [self showStatusController]; [self.statusController beginActionWithTitle:SULocalizedString(@"Extracting update...", @"Take care not to overflow the status window.") maxProgressValue:0.0 statusText:nil]; diff --git a/Sparkle/SPUStatusCompletionResults.h b/Sparkle/SPUStatusCompletionResults.h index 98328381..0283c119 100644 --- a/Sparkle/SPUStatusCompletionResults.h +++ b/Sparkle/SPUStatusCompletionResults.h @@ -18,16 +18,6 @@ #import #endif -typedef NS_ENUM(NSUInteger, SPUUserInitiatedCheckStatus) { - SPUUserInitiatedCheckDone __deprecated_msg("Deprecated because SPUUserInitiatedCheckDone has no effect. Just don't reply with this status."), - SPUUserInitiatedCheckCanceled -}; - -typedef NS_ENUM(NSUInteger, SPUDownloadUpdateStatus) { - SPUDownloadUpdateDone __deprecated_msg("Deprecated because SPUDownloadUpdateDone has no effect. Just don't reply with this status."), - SPUDownloadUpdateCanceled -}; - typedef NS_ENUM(NSUInteger, SPUInstallUpdateStatus) { SPUInstallUpdateNow, SPUInstallAndRelaunchUpdateNow, @@ -45,4 +35,16 @@ typedef NS_ENUM(NSInteger, SPUInformationalUpdateAlertChoice) { SPUSkipThisInformationalVersionChoice }; +// Deprecated +typedef NS_ENUM(NSUInteger, SPUUserInitiatedCheckStatus) { + SPUUserInitiatedCheckDone, + SPUUserInitiatedCheckCanceled +}; + +// Deprecated +typedef NS_ENUM(NSUInteger, SPUDownloadUpdateStatus) { + SPUDownloadUpdateDone, + SPUDownloadUpdateCanceled +}; + #endif /* SPUStatusCompletionResults_h */ diff --git a/Sparkle/SPUUIBasedUpdateDriver.m b/Sparkle/SPUUIBasedUpdateDriver.m index 9fd4eafc..d361509c 100644 --- a/Sparkle/SPUUIBasedUpdateDriver.m +++ b/Sparkle/SPUUIBasedUpdateDriver.m @@ -201,25 +201,32 @@ - (void)downloadDriverWillBeginDownload { - [self.userDriver showDownloadInitiatedWithCompletion:^(SPUDownloadUpdateStatus downloadCompletionStatus) { - switch (downloadCompletionStatus) { + void (^cancelDownload)(void) = ^{ + dispatch_async(dispatch_get_main_queue(), ^{ + if ([self.updaterDelegate respondsToSelector:@selector((userDidCancelDownload:))]) { + [self.updaterDelegate userDidCancelDownload:self.updater]; + } + + [self.delegate uiDriverIsRequestingAbortUpdateWithError:nil]; + }); + }; + + if ([self.userDriver respondsToSelector:@selector(showDownloadInitiatedWithCancellation:)]) { + [self.userDriver showDownloadInitiatedWithCancellation:cancelDownload]; + } else { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" - case SPUDownloadUpdateDone: - // Note this status is documented to have no effect + [self.userDriver showDownloadInitiatedWithCompletion:^(SPUDownloadUpdateStatus downloadCompletionStatus) { + switch (downloadCompletionStatus) { #pragma clang diagnostic pop - break; - case SPUDownloadUpdateCanceled: - dispatch_async(dispatch_get_main_queue(), ^{ - if ([self.updaterDelegate respondsToSelector:@selector((userDidCancelDownload:))]) { - [self.updaterDelegate userDidCancelDownload:self.updater]; - } - - [self.delegate uiDriverIsRequestingAbortUpdateWithError:nil]; - }); - break; - } - }]; + case SPUDownloadUpdateDone: + break; + case SPUDownloadUpdateCanceled: + cancelDownload(); + break; + } + }]; + } } - (void)downloadDriverDidReceiveExpectedContentLength:(uint64_t)expectedContentLength diff --git a/Sparkle/SPUUserDriver.h b/Sparkle/SPUUserDriver.h index a3ae4f63..00391c4a 100644 --- a/Sparkle/SPUUserDriver.h +++ b/Sparkle/SPUUserDriver.h @@ -55,10 +55,10 @@ SU_EXPORT @protocol SPUUserDriver * * Respond to the user initiating an update check. Sparkle uses this to show the user a window with an indeterminate progress bar. * - * @param updateCheckStatusCompletion A reply that can be used to cancel the update check with SPUUserInitiatedCheckCanceled. + * @param cancellation Invoke this cancellation block to cancel the update check. * Attempts to canceling can be made before -dismissUserInitiatedUpdateCheck is invoked. */ -- (void)showUserInitiatedUpdateCheckWithCompletion:(void (^)(SPUUserInitiatedCheckStatus))updateCheckStatusCompletion; +- (void)showUserInitiatedUpdateCheckWithCancellation:(void (^)(void))cancellation; /*! * Dismiss the user initiated update check from the user @@ -179,10 +179,9 @@ SU_EXPORT @protocol SPUUserDriver * * Let the user know that downloading the new update started. * - * @param downloadUpdateStatusCompletion A reply of SPUDownloadUpdateCanceled can be used to cancel - * the download at any point before -showDownloadDidStartExtractingUpdate is invoked. + * @param cancellation Invoke this cancellation block to cancel the download at any point before -showDownloadDidStartExtractingUpdate is invoked. */ -- (void)showDownloadInitiatedWithCompletion:(void (^)(SPUDownloadUpdateStatus))downloadUpdateStatusCompletion; +- (void)showDownloadInitiatedWithCancellation:(void (^)(void))cancellation; /*! * Show the user the content length of the new update that will be downloaded @@ -267,16 +266,25 @@ SU_EXPORT @protocol SPUUserDriver /*! * Dismiss the current update installation * - * Stop and tear down everything. Reply to all outstanding reply/completion blocks. + * Stop and tear down everything. * Dismiss all update windows, alerts, progress, etc from the user. * Basically, stop everything that could have been started. Sparkle may invoke this when aborting or finishing an update. */ - (void)dismissUpdateInstallation; +/* + * Below are deprecated methods that have been replaced by better alternatives. + * The deprecated methods will be used if the alternatives have not been implemented yet. + * In the future support for using these deprecated methods may be removed however. + */ @optional - (void)showUpdateNotFoundWithAcknowledgement:(void (^)(void))acknowledgement __deprecated_msg("Implement -showUpdateNotFoundWithError:acknowledgement: instead"); +- (void)showUserInitiatedUpdateCheckWithCompletion:(void (^)(SPUUserInitiatedCheckStatus))updateCheckStatusCompletion __deprecated_msg("Implement -showUserInitiatedUpdateCheckWithCancellation: instead"); + +- (void)showDownloadInitiatedWithCompletion:(void (^)(SPUDownloadUpdateStatus))downloadUpdateStatusCompletion __deprecated_msg("Implement -showDownloadInitiatedWithCancellation: instead"); + @end NS_ASSUME_NONNULL_END diff --git a/Sparkle/SPUUserDriverCoreComponent.h b/Sparkle/SPUUserDriverCoreComponent.h index 4ccfdab3..d6db4887 100644 --- a/Sparkle/SPUUserDriverCoreComponent.h +++ b/Sparkle/SPUUserDriverCoreComponent.h @@ -24,13 +24,9 @@ SU_EXPORT @interface SPUUserDriverCoreComponent : NSObject - (void)registerInstallUpdateHandler:(void (^)(SPUInstallUpdateStatus))installUpdateHandler; - (void)installUpdateWithChoice:(SPUInstallUpdateStatus)choice; -- (void)registerUpdateCheckStatusHandler:(void (^)(SPUUserInitiatedCheckStatus))updateCheckStatusCompletion; -- (void)cancelUpdateCheckStatus; -- (void)completeUpdateCheckStatus; - -- (void)registerDownloadStatusHandler:(void (^)(SPUDownloadUpdateStatus))downloadUpdateStatusCompletion; -- (void)cancelDownloadStatus; -- (void)completeDownloadStatus; +- (void)registerCancellation:(void (^)(void))cancellation; +- (void)cancel; +- (void)clearCancellation; - (void)registerAcknowledgement:(void (^)(void))acknowledgement; - (void)acceptAcknowledgement; diff --git a/Sparkle/SPUUserDriverCoreComponent.m b/Sparkle/SPUUserDriverCoreComponent.m index b1042077..2aeb2ed9 100644 --- a/Sparkle/SPUUserDriverCoreComponent.m +++ b/Sparkle/SPUUserDriverCoreComponent.m @@ -14,8 +14,7 @@ @interface SPUUserDriverCoreComponent () @property (nonatomic, copy) void (^installUpdateHandler)(SPUInstallUpdateStatus); -@property (nonatomic, copy) void (^updateCheckStatusCompletion)(SPUUserInitiatedCheckStatus); -@property (nonatomic, copy) void (^downloadStatusCompletion)(SPUDownloadUpdateStatus); +@property (nonatomic, copy) void (^cancellation)(void); @property (nonatomic, copy) void (^acknowledgement)(void); @end @@ -23,8 +22,7 @@ @implementation SPUUserDriverCoreComponent @synthesize installUpdateHandler = _installUpdateHandler; -@synthesize updateCheckStatusCompletion = _updateCheckStatusCompletion; -@synthesize downloadStatusCompletion = _downloadStatusCompletion; +@synthesize cancellation = _cancellation; @synthesize acknowledgement = _acknowledgement; #pragma mark Install Updates @@ -50,44 +48,24 @@ } } -#pragma mark Update Check Status +#pragma mark Cancellation -- (void)registerUpdateCheckStatusHandler:(void (^)(SPUUserInitiatedCheckStatus))updateCheckStatusCompletion +- (void)registerCancellation:(void (^)(void))cancellation { - self.updateCheckStatusCompletion = updateCheckStatusCompletion; + self.cancellation = cancellation; } -- (void)cancelUpdateCheckStatus +- (void)cancel { - if (self.updateCheckStatusCompletion != nil) { - self.updateCheckStatusCompletion(SPUUserInitiatedCheckCanceled); - self.updateCheckStatusCompletion = nil; + if (self.cancellation != nil) { + self.cancellation(); + self.cancellation = nil; } } -- (void)completeUpdateCheckStatus +- (void)clearCancellation { - self.updateCheckStatusCompletion = nil; -} - -#pragma mark Download Status - -- (void)registerDownloadStatusHandler:(void (^)(SPUDownloadUpdateStatus))downloadUpdateStatusCompletion -{ - self.downloadStatusCompletion = downloadUpdateStatusCompletion; -} - -- (void)cancelDownloadStatus -{ - if (self.downloadStatusCompletion != nil) { - self.downloadStatusCompletion(SPUDownloadUpdateCanceled); - self.downloadStatusCompletion = nil; - } -} - -- (void)completeDownloadStatus -{ - self.downloadStatusCompletion = nil; + self.cancellation = nil; } #pragma mark Simple Acknoledgments @@ -109,10 +87,9 @@ - (void)dismissUpdateInstallation { - [self acceptAcknowledgement]; - [self cancelUpdateCheckStatus]; - [self cancelDownloadStatus]; - [self dismissInstallAndRestart]; + self.acknowledgement = nil; + self.cancellation = nil; + self.installUpdateHandler = nil; } @end diff --git a/Sparkle/SPUUserInitiatedUpdateDriver.m b/Sparkle/SPUUserInitiatedUpdateDriver.m index 3c5cc1b6..5bcdaa28 100644 --- a/Sparkle/SPUUserInitiatedUpdateDriver.m +++ b/Sparkle/SPUUserInitiatedUpdateDriver.m @@ -50,23 +50,30 @@ } else { self.showingUserInitiatedProgress = YES; - [self.userDriver showUserInitiatedUpdateCheckWithCompletion:^(SPUUserInitiatedCheckStatus completionStatus) { - switch (completionStatus) { + void (^cancelUpdateCheck)(void) = ^{ + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.showingUserInitiatedProgress) { + [self abortUpdate]; + } + }); + }; + + if ([self.userDriver respondsToSelector:@selector(showUserInitiatedUpdateCheckWithCancellation:)]) { + [self.userDriver showUserInitiatedUpdateCheckWithCancellation:cancelUpdateCheck]; + } else { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" - case SPUUserInitiatedCheckDone: - // Note this status is documented to have no effect + [self.userDriver showUserInitiatedUpdateCheckWithCompletion:^(SPUUserInitiatedCheckStatus completionStatus) { #pragma clang diagnostic pop - break; - case SPUUserInitiatedCheckCanceled: - dispatch_async(dispatch_get_main_queue(), ^{ - if (self.showingUserInitiatedProgress) { - [self abortUpdate]; - } - }); - break; - } - }]; + switch (completionStatus) { + case SPUUserInitiatedCheckDone: + break; + case SPUUserInitiatedCheckCanceled: + cancelUpdateCheck(); + break; + } + }]; + } [self.uiDriver checkForUpdatesAtAppcastURL:appcastURL withUserAgent:userAgent httpHeaders:httpHeaders inBackground:NO includesSkippedUpdates:YES]; } diff --git a/TestApplication/SUPopUpTitlebarUserDriver.m b/TestApplication/SUPopUpTitlebarUserDriver.m index d49fcb43..46d58477 100644 --- a/TestApplication/SUPopUpTitlebarUserDriver.m +++ b/TestApplication/SUPopUpTitlebarUserDriver.m @@ -13,7 +13,6 @@ @property (nonatomic, readonly) NSWindow *window; @property (nonatomic, nullable) SUInstallUpdateViewController *installUpdateViewController; -@property (nonatomic, readonly) SPUUserDriverCoreComponent *coreComponent; @property (nonatomic) NSTitlebarAccessoryViewController *accessoryViewController; @property (nonatomic) BOOL addedAccessory; @property (nonatomic) NSButton *updateButton; @@ -27,7 +26,6 @@ @synthesize window = _window; @synthesize installUpdateViewController = _installUpdateViewController; -@synthesize coreComponent = _coreComponent; @synthesize accessoryViewController = _accessoryViewController; @synthesize addedAccessory = _addedAccessory; @synthesize updateButton = _updateButton; @@ -40,7 +38,6 @@ self = [super init]; if (self != nil) { _window = window; - _coreComponent = [[SPUUserDriverCoreComponent alloc] init]; } return self; } @@ -189,63 +186,52 @@ - (void)showReadyToInstallAndRelaunch:(void (^)(SPUInstallUpdateStatus))installUpdateHandler { - [self.coreComponent registerInstallUpdateHandler:installUpdateHandler]; - - __weak SUPopUpTitlebarUserDriver *weakSelf = self; [self addUpdateButtonWithTitle:@"Install & Relaunch" action:^(NSButton *__unused button) { - [weakSelf.coreComponent installUpdateWithChoice:SPUInstallAndRelaunchUpdateNow]; + installUpdateHandler(SPUInstallAndRelaunchUpdateNow); }]; } #pragma mark Check for Updates -- (void)showUserInitiatedUpdateCheckWithCompletion:(void (^)(SPUUserInitiatedCheckStatus))updateCheckStatusCompletion +- (void)showUserInitiatedUpdateCheckWithCancellation:(void (^)(void))__unused cancellation { - [self.coreComponent registerUpdateCheckStatusHandler:updateCheckStatusCompletion]; - [self addUpdateButtonWithTitle:@"Checking for Updates…"]; } - (void)dismissUserInitiatedUpdateCheck { - [self.coreComponent completeUpdateCheckStatus]; [self removeUpdateButton]; } #pragma mark Update Errors -- (void)acceptAcknowledgementAfterDelay +- (void)acceptAcknowledgementAfterDelay:(void (^)(void))acknowledgement { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ // Installation will be dismissed shortly after this - [self.coreComponent acceptAcknowledgement]; + acknowledgement(); }); } - (void)showUpdaterError:(NSError *)error acknowledgement:(void (^)(void))acknowledgement { - [self.coreComponent registerAcknowledgement:acknowledgement]; - NSLog(@"Error: %@", error); [self addUpdateButtonWithTitle:@"Update Errored!" action:nil]; - [self acceptAcknowledgementAfterDelay]; + [self acceptAcknowledgementAfterDelay:acknowledgement]; } - (void)showUpdateNotFoundWithError:(NSError *)error acknowledgement:(void (^)(void))acknowledgement { - [self.coreComponent registerAcknowledgement:acknowledgement]; - [self addUpdateButtonWithTitle:@"No Update Available" action:nil]; - [self acceptAcknowledgementAfterDelay]; + [self acceptAcknowledgementAfterDelay:acknowledgement]; } #pragma mark Download & Install Updates -- (void)showDownloadInitiatedWithCompletion:(void (^)(SPUDownloadUpdateStatus))downloadUpdateStatusCompletion +- (void)showDownloadInitiatedWithCancellation:(void (^)(void))__unused cancellation { - [self.coreComponent registerDownloadStatusHandler:downloadUpdateStatusCompletion]; } - (void)showDownloadDidReceiveExpectedContentLength:(uint64_t)expectedContentLength @@ -272,7 +258,6 @@ - (void)showDownloadDidStartExtractingUpdate { - [self.coreComponent completeDownloadStatus]; [self addUpdateButtonWithTitle:@"Extracting…"]; } @@ -294,19 +279,15 @@ - (void)showUpdateInstallationDidFinishWithAcknowledgement:(void (^)(void))acknowledgement { - [self.coreComponent registerAcknowledgement:acknowledgement]; - [self addUpdateButtonWithTitle:@"Installation Finished!"]; - [self acceptAcknowledgementAfterDelay]; + [self acceptAcknowledgementAfterDelay:acknowledgement]; } #pragma mark Aborting Everything - (void)dismissUpdateInstallation { - [self.coreComponent dismissUpdateInstallation]; - [self removeUpdateButton]; } diff --git a/sparkle-cli/SPUCommandLineUserDriver.m b/sparkle-cli/SPUCommandLineUserDriver.m index 4f9c2c90..2ca61bdf 100644 --- a/sparkle-cli/SPUCommandLineUserDriver.m +++ b/sparkle-cli/SPUCommandLineUserDriver.m @@ -17,7 +17,6 @@ @property (nonatomic, nullable, readonly) SUUpdatePermissionResponse *updatePermissionResponse; @property (nonatomic, readonly) BOOL deferInstallation; @property (nonatomic, readonly) BOOL verbose; -@property (nonatomic, readonly) SPUUserDriverCoreComponent *coreComponent; @property (nonatomic) uint64_t bytesDownloaded; @property (nonatomic) uint64_t bytesToDownload; @@ -28,7 +27,6 @@ @synthesize updatePermissionResponse = _updatePermissionResponse; @synthesize deferInstallation = _deferInstallation; @synthesize verbose = _verbose; -@synthesize coreComponent = _coreComponent; @synthesize bytesDownloaded = _bytesDownloaded; @synthesize bytesToDownload = _bytesToDownload; @@ -39,7 +37,6 @@ _updatePermissionResponse = updatePermissionResponse; _deferInstallation = deferInstallation; _verbose = verbose; - _coreComponent = [[SPUUserDriverCoreComponent alloc] init]; } return self; } @@ -62,9 +59,8 @@ } } -- (void)showUserInitiatedUpdateCheckWithCompletion:(void (^)(SPUUserInitiatedCheckStatus))updateCheckStatusCompletion +- (void)showUserInitiatedUpdateCheckWithCancellation:(void (^)(void))__unused cancellation { - [self.coreComponent registerUpdateCheckStatusHandler:updateCheckStatusCompletion]; if (self.verbose) { fprintf(stderr, "Checking for Updates...\n"); } @@ -72,7 +68,6 @@ - (void)dismissUserInitiatedUpdateCheck { - [self.coreComponent completeUpdateCheckStatus]; } - (void)displayReleaseNotes:(const char * _Nullable)releaseNotes @@ -124,16 +119,15 @@ - (void)showResumableUpdateFoundWithAppcastItem:(SUAppcastItem *)appcastItem userInitiated:(BOOL)__unused userInitiated reply:(void (^)(SPUInstallUpdateStatus))reply { - [self.coreComponent registerInstallUpdateHandler:reply]; [self showUpdateWithAppcastItem:appcastItem updateAdjective:@"resumable"]; if (self.deferInstallation) { if (self.verbose) { fprintf(stderr, "Deferring Installation.\n"); } - [self.coreComponent installUpdateWithChoice:SPUDismissUpdateInstallation]; + reply(SPUDismissUpdateInstallation); } else { - [self.coreComponent installUpdateWithChoice:SPUInstallAndRelaunchUpdateNow]; + reply(SPUInstallAndRelaunchUpdateNow); } } @@ -187,10 +181,8 @@ exit(EXIT_FAILURE); } -- (void)showDownloadInitiatedWithCompletion:(void (^)(SPUDownloadUpdateStatus))downloadUpdateStatusCompletion +- (void)showDownloadInitiatedWithCancellation:(void (^)(void))__unused cancellation { - [self.coreComponent registerDownloadStatusHandler:downloadUpdateStatusCompletion]; - if (self.verbose) { fprintf(stderr, "Downloading Update...\n"); } @@ -221,8 +213,6 @@ - (void)showDownloadDidStartExtractingUpdate { - [self.coreComponent completeDownloadStatus]; - if (self.verbose) { fprintf(stderr, "Extracting update...\n"); } @@ -237,15 +227,13 @@ - (void)showReadyToInstallAndRelaunch:(void (^)(SPUInstallUpdateStatus))installUpdateHandler { - [self.coreComponent registerInstallUpdateHandler:installUpdateHandler]; - if (self.deferInstallation) { if (self.verbose) { fprintf(stderr, "Deferring Installation.\n"); } - [self.coreComponent installUpdateWithChoice:SPUDismissUpdateInstallation]; + installUpdateHandler(SPUDismissUpdateInstallation); } else { - [self.coreComponent installUpdateWithChoice:SPUInstallAndRelaunchUpdateNow]; + installUpdateHandler(SPUInstallAndRelaunchUpdateNow); } } @@ -258,13 +246,11 @@ - (void)showUpdateInstallationDidFinishWithAcknowledgement:(void (^)(void))acknowledgement { - [self.coreComponent registerAcknowledgement:acknowledgement]; - if (self.verbose) { fprintf(stderr, "Installation Finished.\n"); } - [self.coreComponent acceptAcknowledgement]; + acknowledgement(); } - (void)dismissUpdateInstallation __attribute__((noreturn))