Fix updateManagerShouldSendUsageData from BITUpdateManagerDelegate being called at the wrong time

This commit is contained in:
Andreas Linde
2014-05-09 14:41:28 +02:00
parent 75263f64fc
commit 5f9de5a4eb

View File

@@ -424,10 +424,6 @@ typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) {
self.lastCheck = [NSDate distantPast];
}
if (self.delegate != nil && [self.delegate respondsToSelector:@selector(updateManagerShouldSendUsageData:)]) {
_sendUsageData = [self.delegate updateManagerShouldSendUsageData:self];
}
if (!BITHockeyBundle()) {
NSLog(@"[HockeySDK] WARNING: %@ is missing, make sure it is added!", BITHOCKEYSDK_BUNDLE);
}
@@ -763,6 +759,10 @@ typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) {
BITHockeyLog(@"INFO: Starting UpdateManager");
if (self.delegate != nil && [self.delegate respondsToSelector:@selector(updateManagerShouldSendUsageData:)]) {
_sendUsageData = [self.delegate updateManagerShouldSendUsageData:self];
}
[self checkExpiryDateReached];
if (![self expiryDateReached]) {
if ([self checkForTracker] || ([self isCheckForUpdateOnLaunch] && [self shouldCheckForUpdates])) {