Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'iOSClient/PushNotification/NCPushNotification.m')
-rw-r--r--iOSClient/PushNotification/NCPushNotification.m20
1 files changed, 10 insertions, 10 deletions
diff --git a/iOSClient/PushNotification/NCPushNotification.m b/iOSClient/PushNotification/NCPushNotification.m
index ff9746b26..022ce68c6 100644
--- a/iOSClient/PushNotification/NCPushNotification.m
+++ b/iOSClient/PushNotification/NCPushNotification.m
@@ -106,13 +106,13 @@
NSString *pushDevicePublicKey = [[NSString alloc] initWithData:pushPublicKey encoding:NSUTF8StringEncoding];
NSString *proxyServerPath = [NCBrandOptions shared].pushNotificationServerProxy;
- [[NCCommunication shared] subscribingPushNotificationWithServerUrl:urlBase account:account user:user password:[CCUtility getPassword:account] pushTokenHash:pushTokenHash devicePublicKey:pushDevicePublicKey proxyServerUrl:proxyServerPath customUserAgent:nil addCustomHeaders:nil queue:dispatch_get_main_queue() completionHandler:^(NSString *account, NSString *deviceIdentifier, NSString *signature, NSString *publicKey, NSInteger errorCode, NSString *errorDescription) {
- if (errorCode == 0) {
+ [[NextcloudKit shared] subscribingPushNotificationWithServerUrl:urlBase account:account user:user password:[CCUtility getPassword:account] pushTokenHash:pushTokenHash devicePublicKey:pushDevicePublicKey proxyServerUrl:proxyServerPath customUserAgent:nil addCustomHeaders:nil queue:dispatch_get_main_queue() completion:^(NSString *account, NSString *deviceIdentifier, NSString *signature, NSString *publicKey, NSData *data, NKError *error) {
+ if (error == NKError.success) {
NSString *userAgent = [NSString stringWithFormat:@"%@ (Strict VoIP)", [CCUtility getUserAgent]];
- [[NCCommunication shared] subscribingPushProxyWithProxyServerUrl:proxyServerPath pushToken:self.pushKitToken deviceIdentifier:deviceIdentifier signature:signature publicKey:publicKey userAgent:userAgent queue:dispatch_get_main_queue() completionHandler:^(NSInteger errorCode, NSString *errorDescription) {
- if (errorCode == 0) {
+ [[NextcloudKit shared] subscribingPushProxyWithProxyServerUrl:proxyServerPath pushToken:self.pushKitToken deviceIdentifier:deviceIdentifier signature:signature publicKey:publicKey userAgent:userAgent queue:dispatch_get_main_queue() completion:^(NKError *error) {
+ if (error == NKError.success) {
- [[NCCommunicationCommon shared] writeLog:@"Subscribed to Push Notification server & proxy successfully"];
+ [[NKCommon shared] writeLog:@"[INFO] Subscribed to Push Notification server & proxy successfully"];
[CCUtility setPushNotificationToken:account token:self.pushKitToken];
[CCUtility setPushNotificationDeviceIdentifier:account deviceIdentifier:deviceIdentifier];
@@ -132,14 +132,14 @@
NSString *signature = [CCUtility getPushNotificationDeviceIdentifierSignature:account];
NSString *publicKey = [CCUtility getPushNotificationSubscribingPublicKey:account];
- [[NCCommunication shared] unsubscribingPushNotificationWithServerUrl:urlBase account:account user:user password:[CCUtility getPassword:account] customUserAgent:nil addCustomHeaders:nil queue:dispatch_get_main_queue() completionHandler:^(NSString *account, NSInteger errorCode, NSString *errorDescription) {
- if (errorCode == 0) {
+ [[NextcloudKit shared] unsubscribingPushNotificationWithServerUrl:urlBase account:account user:user password:[CCUtility getPassword:account] customUserAgent:nil addCustomHeaders:nil queue:dispatch_get_main_queue() completion:^(NSString *account, NKError *error) {
+ if (error == NKError.success) {
NSString *userAgent = [NSString stringWithFormat:@"%@ (Strict VoIP)", [CCUtility getUserAgent]];
NSString *proxyServerPath = [NCBrandOptions shared].pushNotificationServerProxy;
- [[NCCommunication shared] unsubscribingPushProxyWithProxyServerUrl:proxyServerPath deviceIdentifier:deviceIdentifier signature:signature publicKey:publicKey userAgent:userAgent queue:dispatch_get_main_queue() completionHandler:^(NSInteger errorCode, NSString *errorDescription) {
- if (errorCode == 0) {
+ [[NextcloudKit shared] unsubscribingPushProxyWithProxyServerUrl:proxyServerPath deviceIdentifier:deviceIdentifier signature:signature publicKey:publicKey userAgent:userAgent queue:dispatch_get_main_queue() completion:^(NKError *error) {
+ if (error == NKError.success) {
- [[NCCommunicationCommon shared] writeLog:@"Unsubscribed to Push Notification server & proxy successfully."];
+ [[NKCommon shared] writeLog:@"[INFO] Unsubscribed to Push Notification server & proxy successfully."];
[CCUtility setPushNotificationPublicKey:account data:nil];
[CCUtility setPushNotificationSubscribingPublicKey:account publicKey:nil];