From 6437e0448a0c7275e27ac43cc70234a7904dab62 Mon Sep 17 00:00:00 2001 From: Zorg Date: Fri, 24 Jun 2016 20:13:17 -0400 Subject: [PATCH] Warn a developer if they're using a debug version of Sparkle Due to different values for min/default update check intervals, production apps should not use a debug version of Sparkle --- Sparkle/SUUpdater.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index 22a71bec..51dec809 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -59,6 +59,15 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification static NSMutableDictionary *sharedUpdaters = nil; static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaultsObservationContext"; +#ifdef DEBUG ++ (void)load +{ + // Debug builds have different configurations for update check intervals + // We're using NSLog instead of SULog here because we don't want to start Sparkle's logger here + NSLog(@"WARNING: This is running a Debug build of Sparkle; don't use this in production!"); +} +#endif + + (SUUpdater *)sharedUpdater { return [self updaterForBundle:[NSBundle mainBundle]];