From b58eeeabb5a31519949cc38a2031a1aec32cd0ce Mon Sep 17 00:00:00 2001 From: Zorg Date: Wed, 2 Mar 2016 01:13:33 -0500 Subject: [PATCH] Add docs to SUUpdater initializer --- Sparkle/SUUpdater.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h index 39f5ce01..a0d41b75 100644 --- a/Sparkle/SUUpdater.h +++ b/Sparkle/SUUpdater.h @@ -26,7 +26,24 @@ */ SU_EXPORT @interface SUUpdater : NSObject -- (instancetype)initWithHostBundle:(NSBundle *)bundle userDriver:(id )userDriver delegate:(id )delegate; +/*! + * Initializes a new SUUpdater instance + * + * Update checks will start a short delay after initialization. This is to prevent the updater starting work before an application may have finished launching. + * + * Note that this is a normal initializer and doesn't implement the singleton pattern (i.e, instances aren't cached, so no surprises) + * Hence you shouldn't create multiple live instances that target the same bundle. + * However, this also means that updater instances can be deallocated, and that they will be torn down properly + * + * Related: See SUUpdaterController which wraps a SUUpdater instance and is suitable for instantiating in nib files + * + * @param hostBundle The bundle that should be targetted for updating. This must not be nil. + * @param userDriver The user driver that Sparkle uses for user update interaction + * @param delegate The delegate for SUUpdater. This may be nil. + * + * This must be called on the main thread. + */ +- (instancetype)initWithHostBundle:(NSBundle *)hostBundle userDriver:(id )userDriver delegate:(id )delegate; @property (weak) id delegate; @property (nonatomic, readonly) id userDriver;