From 79e3b3aafda955a3f2eed852b1886b416fe9d662 Mon Sep 17 00:00:00 2001 From: heavyrain2012 Date: Sun, 26 Sep 2021 15:01:44 +0800 Subject: [PATCH] add log for apns --- src/main/java/cn/wildfirechat/push/ios/ApnsServer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/cn/wildfirechat/push/ios/ApnsServer.java b/src/main/java/cn/wildfirechat/push/ios/ApnsServer.java index 5f4e1be..da95981 100644 --- a/src/main/java/cn/wildfirechat/push/ios/ApnsServer.java +++ b/src/main/java/cn/wildfirechat/push/ios/ApnsServer.java @@ -256,6 +256,9 @@ public class ApnsServer { pushNotification = new SimpleApnsPushNotification(pushMessage.voipDeviceToken, pushMessage.packageName + ".voip", payload, c.getTime(), DeliveryPriority.IMMEDIATE, PushType.VOIP, collapseId); } + SimpleApnsPushNotification simpleApnsPushNotification = (SimpleApnsPushNotification)pushNotification; + LOG.info("CollapseId:{}", simpleApnsPushNotification.getCollapseId()); + if (service == null) { LOG.error("Service not exist!!!!"); return; @@ -274,6 +277,9 @@ public class ApnsServer { sendNotificationFuture.getNow(); if(!pushNotificationResponse.isAccepted()) { LOG.error("apns push failure: {}", pushNotificationResponse.getRejectionReason()); + } else { + LOG.info("push success: {}", pushNotificationResponse.getApnsId().toString()); + LOG.info("token invalidate timestamp: {}", pushNotificationResponse.getTokenInvalidationTimestamp()); } } else { // Something went wrong when trying to send the notification to the