diff --git a/Classes/BITUpdateManager.h b/Classes/BITUpdateManager.h index 77c2ec3cf7..be01e1a2b2 100644 --- a/Classes/BITUpdateManager.h +++ b/Classes/BITUpdateManager.h @@ -94,6 +94,8 @@ typedef enum { BOOL _isAppStoreEnvironment; + BOOL _checkForUpdateOnLaunchOfBitUpdateManager; + NSString *_uuid; } diff --git a/Classes/BITUpdateManager.m b/Classes/BITUpdateManager.m index e03bbf7b3a..d036572eb7 100644 --- a/Classes/BITUpdateManager.m +++ b/Classes/BITUpdateManager.m @@ -131,9 +131,12 @@ } - (void)didBecomeActiveActions { + _checkForUpdateOnLaunchOfBitUpdateManager = YES; + if (![self isUpdateManagerDisabled]) { [self checkExpiryDateReached]; [self startUsage]; + [self checkForUpdate]; } } @@ -350,6 +353,7 @@ _sendUsageData = YES; _disableUpdateManager = NO; _checkForTracker = NO; + _checkForUpdateOnLaunchOfBitUpdateManager = NO; // set defaults self.showDirectInstallOption = NO; @@ -909,7 +913,9 @@ } } else { if ([self checkForTracker] || ([self isCheckForUpdateOnLaunch] && [self shouldCheckForUpdates])) { - [self performSelector:@selector(checkForUpdate) withObject:nil afterDelay:1.0f]; + if (!_checkForUpdateOnLaunchOfBitUpdateManager) { + [self performSelector:@selector(checkForUpdate) withObject:nil afterDelay:1.0f]; + } } } } else { @@ -917,7 +923,9 @@ // if we are in the app store, make sure not to send usage information in any case for now _sendUsageData = NO; - [self performSelector:@selector(checkForUpdate) withObject:nil afterDelay:1.0f]; + if (!_checkForUpdateOnLaunchOfBitUpdateManager) { + [self performSelector:@selector(checkForUpdate) withObject:nil afterDelay:1.0f]; + } } } }