Move Sparkle debug warning into +load

Also use NSLog here instead of SULog because we don't want to start the logger early on
This commit is contained in:
Zorg committed 2016-04-16 17:53:16 -04:00
1 parent e767f6a4c6
commit 39bc068b89
1 file changed
+9 -4
+9 -4
View File
@@ -62,6 +62,15 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
@synthesize startedUpdater = _startedUpdater;
@synthesize preStartedScheduledUpdateBlock = _preStartedScheduledUpdateBlock;
#ifdef DEBUG
+ (void)load
{
// We're using NSLog instead of SULog here because we don't want to start Sparkle's logger here,
// nor want to write this message to disk
NSLog(@"WARNING: This is running a Debug build of Sparkle; don't use this in production!");
}
#endif
- (instancetype)initWithHostBundle:(NSBundle *)bundle userDriver:(id <SUUserDriver>)userDriver delegate:(id <SUUpdaterDelegate>)theDelegate
{
self = [super init];
@@ -77,10 +86,6 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
_userDriver = userDriver;
_delegate = theDelegate;
#ifdef DEBUG
SULog(@"WARNING: This is running a Debug build of Sparkle; don't use this in production!");
#endif
}
return self;