From bda65d8a9f536a9af289dce517367a51ba03d7b5 Mon Sep 17 00:00:00 2001 From: Paul Cartier Date: Mon, 30 Mar 2020 11:22:18 +0200 Subject: [PATCH] Fix token bug and print push payload --- Classes/LinphoneManager.m | 2 +- msgNotificationService/NotificationService.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 00113deb5..ceb383247 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -2058,7 +2058,7 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { const unsigned char *remoteTokenBuffer = [remoteTokenData bytes]; NSMutableString *remoteTokenString = [NSMutableString stringWithCapacity:[remoteTokenData length] * 2]; - for (int i = 0; i < [PKTokenData length]; ++i) { + for (int i = 0; i < [remoteTokenData length]; ++i) { [remoteTokenString appendFormat:@"%02X", (unsigned int)remoteTokenBuffer[i]]; } diff --git a/msgNotificationService/NotificationService.swift b/msgNotificationService/NotificationService.swift index e4ad3a56c..fb0e2553e 100644 --- a/msgNotificationService/NotificationService.swift +++ b/msgNotificationService/NotificationService.swift @@ -47,6 +47,7 @@ class NotificationService: UNNotificationServiceExtension { NSLog("[msgNotificationService] start msgNotificationService extension") if let bestAttemptContent = bestAttemptContent { + NSLog("[msgNotificationService] received push payload : \(bestAttemptContent.userInfo.debugDescription)") createCore() if let chatRoomInviteAddr = bestAttemptContent.userInfo["chat-room-addr"] as? String, !chatRoomInviteAddr.isEmpty {