diff --git a/SUConstants.h b/SUConstants.h index 4a807d38..19191d0e 100644 --- a/SUConstants.h +++ b/SUConstants.h @@ -29,6 +29,7 @@ extern NSString *const SUEnableAutomaticChecksKeyOld; extern NSString *const SUEnableSystemProfilingKey; extern NSString *const SUSendProfileInfoKey; extern NSString *const SULastProfileSubmitDateKey; +extern NSString *const SUPromptUserOnFirstLaunchKey; extern NSString *const SUSparkleErrorDomain; // Appcast phase errors. diff --git a/SUConstants.m b/SUConstants.m index 5f06311f..536fc6c5 100644 --- a/SUConstants.m +++ b/SUConstants.m @@ -28,6 +28,7 @@ NSString *const SUEnableAutomaticChecksKey = @"SUEnableAutomaticChecks"; NSString *const SUEnableAutomaticChecksKeyOld = @"SUCheckAtStartup"; NSString *const SUSendProfileInfoKey = @"SUSendProfileInfo"; NSString *const SULastProfileSubmitDateKey = @"SULastProfileSubmissionDate"; +NSString *const SUPromptUserOnFirstLaunchKey = @"SUPromptUserOnFirstLaunch"; NSString *const SUSparkleErrorDomain = @"SUSparkleErrorDomain"; OSStatus SUAppcastParseError = 1000; diff --git a/SUUpdater.m b/SUUpdater.m index 93c71d00..ad2c722e 100644 --- a/SUUpdater.m +++ b/SUUpdater.m @@ -112,9 +112,14 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault if ([host objectForUserDefaultsKey:SUEnableAutomaticChecksKeyOld]) [self setAutomaticallyChecksForUpdates:[host boolForUserDefaultsKey:SUEnableAutomaticChecksKeyOld]]; // Now, we don't want to ask the user for permission to do a weird thing on the first launch. - // We wait until the second launch. - else if ([host boolForUserDefaultsKey:SUHasLaunchedBeforeKey] == NO) - [host setBool:YES forUserDefaultsKey:SUHasLaunchedBeforeKey]; + // We wait until the second launch, unless explicitly overridden via SUPromptUserOnFirstLaunchKey. + else if (![host objectForKey:SUPromptUserOnFirstLaunchKey]) + { + if ([host boolForUserDefaultsKey:SUHasLaunchedBeforeKey] == NO) + [host setBool:YES forUserDefaultsKey:SUHasLaunchedBeforeKey]; + else + shouldPrompt = YES; + } else shouldPrompt = YES; }