繁体   English   中英

Javapns推送通知无效令牌

[英]Javapns push notification Invalid Token

我正在尝试推送通知,但是每次我收到无效的令牌时。 我得到的错误是:

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));

APNS:[1]无效令牌表示您使用的设备令牌无效。 假设您的应用从Apple获得了该设备令牌(并且您没有使用随机令牌),则您可能正在使用开发令牌将推送通知发送到生产推送服务器,反之亦然。 设备令牌仅在一个环境(沙箱或生产环境)中有效。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM