From a8252cbe20151175573ab77473e7f4529fb316e8 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 27 Mar 2016 14:50:05 -0400 Subject: [PATCH] This is supposed to be main bundle actually --- Sparkle/SUStandardUpdaterController.h | 1 + Sparkle/SUStandardUpdaterController.m | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Sparkle/SUStandardUpdaterController.h b/Sparkle/SUStandardUpdaterController.h index 204fdc52..ae7ea251 100644 --- a/Sparkle/SUStandardUpdaterController.h +++ b/Sparkle/SUStandardUpdaterController.h @@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN This controller class may not be valuable to you if: * You want to control or defer the instantiation of an SUUpdater, or don't want to be tied into a nib's instantiation, or don't want to use a nib + * You want to target a bundle that's not the main bundle * You want to separate Sparkle's updater and user interface into separate processes * You want to provide a custom user interface, or perhaps one that provides little-to-none * You don't want to use a convenience class that provides very little glue ;) diff --git a/Sparkle/SUStandardUpdaterController.m b/Sparkle/SUStandardUpdaterController.m index e74bc852..ab7a145e 100644 --- a/Sparkle/SUStandardUpdaterController.m +++ b/Sparkle/SUStandardUpdaterController.m @@ -62,10 +62,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults if (!self.initializedUpdater) { self.initializedUpdater = YES; - // We may not be the same bundle as the main bundle so we can't use that - // We also can't use [self class] because somebody could subclass us and could live elsewhere - NSBundle *hostBundle = [NSBundle bundleForClass:[SUStandardUpdaterController class]]; - + NSBundle *hostBundle = [NSBundle mainBundle]; id userDriver = [[SUStandardUserDriver alloc] initWithHostBundle:hostBundle delegate:self.userDriverDelegate]; self.updater = [[SUUpdater alloc] initWithHostBundle:hostBundle userDriver:userDriver delegate:self.updaterDelegate]; self.userDriver = userDriver;