any option to know if apple app get the push notification?

后端 未结 5 538
清酒与你
清酒与你 2020-12-06 18:31

I build xcode app that get push notification, the main problem is that the push notification is very critical for me. so I want to check if the push notification is delivere

5条回答
  •  误落风尘
    2020-12-06 19:23

    If you are using JAVAPNS to send the APNS notification, you can use the below:

    List notifications = 
    Push.combined("alert", badge, "default", "cert.p12", "certpassword", true, deviceToken);
    
    for (PushedNotification notification : notifications) {
        if (notification.isSuccessful()) { 
           //Push is successful. Do your thing...
        }
        else {
           //Push is not successful. Do your thing...
        }
     } 
    

提交回复
热议问题