|
@@ -285,6 +285,9 @@
|
|
|
if ([self.delegate respondsToSelector:@selector(downloadThumbnailFailure:message:errorCode:)] && [_metadataNet.action isEqualToString:actionDownloadThumbnail])
|
|
|
[self.delegate downloadThumbnailFailure:_metadataNet message:[CCError manageErrorOC:response.statusCode error:error] errorCode:errorCode];
|
|
|
|
|
|
+ // Activity
|
|
|
+ [CCCoreData addActivityFile:_metadataNet.fileName action:@"Get Thumbnail" note:[error.userInfo valueForKey:@"NSLocalizedDescription"] session:[CCUtility createRandomString:16] type:k_activityTypeFailure verbose:k_activityVerboseDebug account:_metadataNet.account];
|
|
|
+
|
|
|
[self complete];
|
|
|
}];
|
|
|
}
|
|
@@ -1168,6 +1171,9 @@
|
|
|
if ([error code] == NSURLErrorServerCertificateUntrusted)
|
|
|
[[CCCertificate sharedManager] presentViewControllerCertificateWithTitle:[error localizedDescription] viewController:(UIViewController *)self.delegate delegate:self];
|
|
|
|
|
|
+ // Activity
|
|
|
+ [CCCoreData addActivityFile:_activeUrl action:@"Get Notification Server" note:[error.userInfo valueForKey:@"NSLocalizedDescription"] session:[CCUtility createRandomString:16] type:k_activityTypeFailure verbose:k_activityVerboseDebug account:_metadataNet.account];
|
|
|
+
|
|
|
[self complete];
|
|
|
}];
|
|
|
}
|
|
@@ -1229,16 +1235,13 @@
|
|
|
|
|
|
[communication subscribingPushProxy:k_pushNotificationServer pushToken:pushToken deviceIdentifier:deviceIdentifier deviceIdentifierSignature:signature userPublicKey:devicePublicKey onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *publicKey, NSString *deviceIdentifier, NSString *signature, NSString *redirectedServer) {
|
|
|
|
|
|
- NSLog(@"Service registered.");
|
|
|
+ // Activity
|
|
|
+ [CCCoreData addActivityFile:k_pushNotificationServer action:@"Subscribing Push Proxy" note:@"Service registered." session:[CCUtility createRandomString:16] type:k_activityTypeSucces verbose:k_activityVerboseDebug account:_metadataNet.account];
|
|
|
|
|
|
[self complete];
|
|
|
|
|
|
} failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
|
|
|
|
|
|
-#if !defined(EXTENSION) && defined(DEBUG)
|
|
|
- [app messageNotification:@"Subscribing Server Proxy Push Error" description:[error.userInfo valueForKey:@"NSLocalizedDescription"] visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError];
|
|
|
-#endif
|
|
|
-
|
|
|
NSInteger errorCode = response.statusCode;
|
|
|
if (errorCode == 0)
|
|
|
errorCode = error.code;
|
|
@@ -1247,15 +1250,14 @@
|
|
|
if ([error code] == NSURLErrorServerCertificateUntrusted)
|
|
|
[[CCCertificate sharedManager] presentViewControllerCertificateWithTitle:[error localizedDescription] viewController:(UIViewController *)self.delegate delegate:self];
|
|
|
|
|
|
+ // Activity
|
|
|
+ [CCCoreData addActivityFile:k_pushNotificationServer action:@"Subscribing Push Proxy" note:[error.userInfo valueForKey:@"NSLocalizedDescription"] session:[CCUtility createRandomString:16] type:k_activityTypeFailure verbose:k_activityVerboseDebug account:_metadataNet.account];
|
|
|
+
|
|
|
[self complete];
|
|
|
}];
|
|
|
|
|
|
} failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
|
|
|
|
|
|
-#if !defined(EXTENSION) && defined(DEBUG)
|
|
|
- [app messageNotification:@"Subscribing Server Push Error" description:[error.userInfo valueForKey:@"NSLocalizedDescription"] visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError];
|
|
|
-#endif
|
|
|
-
|
|
|
NSInteger errorCode = response.statusCode;
|
|
|
if (errorCode == 0)
|
|
|
errorCode = error.code;
|
|
@@ -1264,6 +1266,9 @@
|
|
|
if ([error code] == NSURLErrorServerCertificateUntrusted)
|
|
|
[[CCCertificate sharedManager] presentViewControllerCertificateWithTitle:[error localizedDescription] viewController:(UIViewController *)self.delegate delegate:self];
|
|
|
|
|
|
+ // Activity
|
|
|
+ [CCCoreData addActivityFile:_activeUrl action:@"Subscribing Server Push" note:[error.userInfo valueForKey:@"NSLocalizedDescription"] session:[CCUtility createRandomString:16] type:k_activityTypeFailure verbose:k_activityVerboseDebug account:_metadataNet.account];
|
|
|
+
|
|
|
[self complete];
|
|
|
}];
|
|
|
}
|
|
@@ -1368,6 +1373,9 @@
|
|
|
if ([error code] == NSURLErrorServerCertificateUntrusted)
|
|
|
[[CCCertificate sharedManager] presentViewControllerCertificateWithTitle:[error localizedDescription] viewController:(UIViewController *)self.delegate delegate:self];
|
|
|
|
|
|
+ // Activity
|
|
|
+ [CCCoreData addActivityFile:_activeUrl action:@"Features Supported By Server" note:[error.userInfo valueForKey:@"NSLocalizedDescription"] session:[CCUtility createRandomString:16] type:k_activityTypeFailure verbose:k_activityVerboseDebug account:_metadataNet.account];
|
|
|
+
|
|
|
[self complete];
|
|
|
}];
|
|
|
}
|
|
@@ -1401,6 +1409,9 @@
|
|
|
if ([error code] == NSURLErrorServerCertificateUntrusted)
|
|
|
[[CCCertificate sharedManager] presentViewControllerCertificateWithTitle:[error localizedDescription] viewController:(UIViewController *)self.delegate delegate:self];
|
|
|
|
|
|
+ // Activity
|
|
|
+ [CCCoreData addActivityFile:_activeUrl action:@"Capabilities Of Server" note:[error.userInfo valueForKey:@"NSLocalizedDescription"] session:[CCUtility createRandomString:16] type:k_activityTypeFailure verbose:k_activityVerboseDebug account:_metadataNet.account];
|
|
|
+
|
|
|
[self complete];
|
|
|
}];
|
|
|
}
|