mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 03:09:56 +00:00
Merge branch 'develop' of github.com:bitstadium/HockeySDK-iOS into develop
This commit is contained in:
commit
e0e338ac5a
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user