diff --git a/Classes/BITHockeyManager.m b/Classes/BITHockeyManager.m index f5e40c567f..3e430e0ca8 100644 --- a/Classes/BITHockeyManager.m +++ b/Classes/BITHockeyManager.m @@ -71,7 +71,11 @@ - (void)logInvalidIdentifier:(NSString *)environment { if (!_appStoreEnvironment) { - NSLog(@"[HockeySDK] ERROR: The %@ is invalid! Please use the HockeyApp app identifier you find on the apps website on HockeyApp! The SDK is disabled!", environment); + if ([environment isEqualToString:@"liveIdentifier"]) { + NSLog(@"[HockeySDK] WARNING: The liveIdentifier is invalid! The SDK will be disabled when deployed to the App Store without setting a valid app identifier!"); + } else { + NSLog(@"[HockeySDK] ERROR: The %@ is invalid! Please use the HockeyApp app identifier you find on the apps website on HockeyApp! The SDK is disabled!", environment); + } } } diff --git a/Classes/BITUpdateManager.m b/Classes/BITUpdateManager.m index 117f0376e5..5557ab1170 100644 --- a/Classes/BITUpdateManager.m +++ b/Classes/BITUpdateManager.m @@ -842,8 +842,11 @@ NSString *responseString = [[NSString alloc] initWithBytes:[_receivedData bytes] length:[_receivedData length] encoding: NSUTF8StringEncoding]; BITHockeyLog(@"INFO: Received API response: %@", responseString); - if (!responseString || ![responseString dataUsingEncoding:NSUTF8StringEncoding]) + if (!responseString || ![responseString dataUsingEncoding:NSUTF8StringEncoding]) { + self.receivedData = nil; + self.urlConnection = nil; return; + } NSError *error = nil; NSDictionary *json = (NSDictionary *)[NSJSONSerialization JSONObjectWithData:[responseString dataUsingEncoding:NSUTF8StringEncoding] options:kNilOptions error:&error]; @@ -854,15 +857,14 @@ if (![self isAppStoreEnvironment]) { NSArray *feedArray = (NSArray *)[json valueForKey:@"versions"]; - self.receivedData = nil; - self.urlConnection = nil; - // remember that we just checked the server self.lastCheck = [NSDate date]; // server returned empty response? if (![feedArray count]) { BITHockeyLog(@"WARNING: No versions available for download on HockeyApp."); + self.receivedData = nil; + self.urlConnection = nil; return; } else { _lastCheckFailed = NO; @@ -921,6 +923,8 @@ code:BITUpdateAPIServerReturnedEmptyResponse userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Server returned an empty response.", NSLocalizedDescriptionKey, nil]]]; } + self.receivedData = nil; + self.urlConnection = nil; } - (BOOL)hasNewerMandatoryVersion {