Перестали работать уведомления на основе токенов APNS pu sh - PullRequest
0 голосов
/ 01 мая 2020

Мой код выглядит следующим образом:

@Override
public void send(PushNotification note) {
    log.info("sending message");

    ApnsPayloadBuilder builder = new ApnsPayloadBuilder();
    builder.setAlertTitle("test");
    builder.setAlertBody("test");
    String payload = builder.buildWithDefaultMaximumLength();
    Date date = new DateTime().plusDays(1).toDate();
    final SimpleApnsPushNotification pushNotification = new SimpleApnsPushNotification("devicetoken","com.example.ios", payload, date);

try {
    final PushNotificationResponse<SimpleApnsPushNotification> pushNotificationResponse =
        sendNotificationFuture.get();

    if (pushNotificationResponse.isAccepted()) {
        System.out.println("Push notification accepted by APNs gateway.");
    } else {
        System.out.println("Notification rejected by the APNs gateway: " +
            pushNotificationResponse.getRejectionReason());
}
} catch (final ExecutionException e) {
     System.err.println("Failed to send push notification.");
     e.printStackTrace();
}

Мы используем аутентификацию на основе токенов, и уведомления работали отлично до нескольких дней go. В журналах я не вижу сообщения об успехе, отклонении или сбое, но вижу «отправка сообщения». Я использую напористый https://github.com/jchambers/pushy. Что это может означать?

...