我试图推送通知,但每次我得到一个无效的令牌。我得到的错误是:
APNS: 1无效令牌javapns.notification.exceptions.ErrorResponsePacketReceivedException:从APNS服务器接收到错误响应数据包: APNS: 1无效令牌]
PushNotificationPayload payload=PushNotificationPayload.complex();
payload.addAlert("Hello");
PushedNotifications Notify=Push.alert("hiii", "C:\\Users\\Documents\\PushNotification\\APNS.p12", "123456", true, "Device Token ");/*ra*/
PushedNotification.findSuccessfulNotifications(Notify);
NotificationTest.printPushedNotifications(Notify);
System.out.println("Success "+PushedNotification.findSuccessfulNotifications(Notify));
System.out.println("failed "+PushedNotification.findFailedNotifications(Notify));发布于 2018-01-25 09:40:46
APNS: 1无效令牌意味着您使用的设备令牌无效。假设您的应用程序从Apple获得了这个设备令牌(并且您没有使用随机令牌),那么您可能使用开发令牌向生产推送服务器发送推送通知,或者向生产推送服务器发送vica通知。设备令牌仅在一个环境(沙箱或生产)中有效。
https://stackoverflow.com/questions/48439627
复制相似问题