@Override
    @SuppressWarnings("FutureReturnValueIgnored")
    public boolean notify(final Principal principal, final Map<String, String> messageData) {
        val deviceToken = principal.getSingleValuedAttribute(properties.getRegistrationTokenAttributeName(), String.class);
        val payload = new SimpleApnsPayloadBuilder()
            .setAlertTitle(messageData.get("title"))
            .setAlertBody(messageData.get("message"))
            .build();

        val pushNotification = new SimpleApnsPushNotification(deviceToken, properties.getTopic(), payload);
        LOGGER.trace("Sending push notification to [{}] with payload [{}]", principal, pushNotification);

        apnsClient.sendNotification(pushNotification)
            .whenComplete((response, cause) -> {
                if (response != null) {
                    if (response.isAccepted()) {
                        LOGGER.debug("Notification [{}] sent to [{}] is accepted successfully", pushNotification, principal.getId());
                    } else {
                        LOGGER.warn("Notification [{}] sent to [{}] rejected with error: [{}]",
                            pushNotification, principal.getId(), response.getRejectionReason().orElse(StringUtils.EMPTY));
                    }
                } else {
                    LoggingUtils.error(LOGGER, cause);
                }
            });
        return true;
    }
This is {@link APNMessagingNotificationSender}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-notifications-apn/src/main/java/org/apereo/cas/notifications/APNMessagingNotificationSender.java