首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Javapns推送通知无效令牌

Javapns推送通知无效令牌
EN

Stack Overflow用户
提问于 2018-01-25 09:34:21
回答 1查看 424关注 0票数 0

我试图推送通知,但每次我得到一个无效的令牌。我得到的错误是:

APNS: 1无效令牌javapns.notification.exceptions.ErrorResponsePacketReceivedException:从APNS服务器接收到错误响应数据包: APNS: 1无效令牌]

代码语言:javascript
复制
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));
EN

回答 1

Stack Overflow用户

发布于 2018-01-25 09:40:46

APNS: 1无效令牌意味着您使用的设备令牌无效。假设您的应用程序从Apple获得了这个设备令牌(并且您没有使用随机令牌),那么您可能使用开发令牌向生产推送服务器发送推送通知,或者向生产推送服务器发送vica通知。设备令牌仅在一个环境(沙箱或生产)中有效。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48439627

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档