From 7f494f13bee7be35f69260de101c7811c0d70369 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 28 Feb 2016 20:16:47 -0500 Subject: [PATCH] Fix not observing driver finishing notifications --- Sparkle/SUUpdater.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index 973be249..f5ca16be 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -67,6 +67,8 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification _userUpdaterDriver = userUpdaterDriver; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateDriverDidFinish:) name:SUUpdateDriverFinishedNotification object:nil]; + [self startUpdateCycle]; return self; @@ -503,6 +505,8 @@ static void SUCheckForUpdatesInBgReachabilityCheck(__weak SUUpdater *updater, SU - (void)dealloc { + // Remove updater did finish notification + [[NSNotificationCenter defaultCenter] removeObserver:self]; [self.userUpdaterDriver invalidateUpdateCheckTimer]; }