linkedkeeper.com的APNS推送服务(http2-java)提示BadDeviceToken
芦苇天 2018-03-01 10:53:30 C#(pushsharp推送已成功实现,但不是基于http2)。
张松然 linkedkeeper.com的APNS推送服务(http2-java)
文章地址:http://linkedkeeper.com/detail/blog.action?bid=163
代码:https://github.com/linkedkeeper/apns-http2
运行测试:提示BadDeviceToken
[main] ERROR com.linkedkeeper.apns.client.ApnsHttp2 - APNs http2 client connect is lost, stablish connection ...
[main] INFO com.linkedkeeper.apns.client.ApnsHttp2Client
- connect api.push.apple.com:443. this connectionReadyPromise null.
[nioEventLoopGroup-2-1] INFO com.linkedkeeper.apns.client.ApnsHttp2Client
- connectionReadyPromise operationComplete, this connectionReadyPromise DefaultChannelPromise@53a6df03(success), this reconnectionPromise null
[nioEventLoopGroup-2-1] INFO com.linkedkeeper.apns.client.ApnsHttp2Client -
Connected to api.push.apple.com/17.188.147.38:443.
[nioEventLoopGroup-2-1] INFO com.linkedkeeper.apns.client.ApnsHttp2Client
- Success to write push notification: ApnsHttp2PushNotification [token=8d5e09d576d64672c7e5a51dd3761c368a65289e58c1f3285d284668909c476f,
payload={"aps":{"badge":1,"alert":"test#1 apns-http2, i = 0 2018-03-01 22:06:19","sound":"default"}},
invalidationTime=null, priority=IMMEDIATE, topic=com.foxconn.PM2Dot5]
[nioEventLoopGroup-2-1] INFO com.linkedkeeper.apns.client.ApnsHttp2Client -
Received response from APNs gateway:
ApnsHttp2PushNotificationResponse
[ApsnPushNotification=ApnsHttp2PushNotification
[token=8d5e09d576d64672c7e5a51dd3761c368a65289e58c1f3285d284668909c476f,
payload={"aps":{"badge":1,"alert":"test#1 apns-http2, i = 0 2018-03-01 22:06:19","sound":"default"}},
invalidationTime=null, priority=IMMEDIATE, topic=com.foxconn.PM2Dot5], success=false,
rejectionReason=BadDeviceToken, tokenExpirationTimestamp=null]
[nioEventLoopGroup-2-1] INFO com.linkedkeeper.apns.client.ApnsHttp2ClientHandler
- Sending ping due to inactivity.
false
[nioEventLoopGroup-2-1] INFO com.linkedkeeper.apns.client.ApnsHttp2Client -
Success to write push notification: ApnsHttp2PushNotification [token=23b04ff56a6fea341500ca536acf534a6792fc29e92ad33f188a64a8a46f21eb, payload={"aps":{"badge":1,"alert":"test#1 apns-http2, i = 1 2018-03-01 22:08:05","sound":"default"}}, invalidationTime=null, priority=IMMEDIATE, topic=com.foxconn.PM2Dot5]
[nioEventLoopGroup-2-1] INFO com.linkedkeeper.apns.client.ApnsHttp2Client
- Received response from APNs gateway: ApnsHttp2PushNotificationResponse [ApsnPushNotification=ApnsHttp2PushNotification [token=23b04ff56a6fea341500ca536acf534a6792fc29e92ad33f188a64a8a46f21eb, payload={"aps":{"badge":1,"alert":"test#1 apns-http2, i = 1 2018-03-01 22:08:05","sound":"default"}},
invalidationTime=null, priority=IMMEDIATE, topic=com.foxconn.PM2Dot5], success=false,
rejectionReason=BadDeviceToken, tokenExpirationTimestamp=null]
false
[main] INFO com.linkedkeeper.apns.client.ApnsHttp2Client - Disconnecting.
[nioEventLoopGroup-2-1] INFO com.linkedkeeper.apns.client.ApnsHttp2Client
- connectFuture.channel close operationComplete, this connectionReadyPromise DefaultChannelPromise@53a6df03(success),
this reconnectionPromise null
哪位大神使用过,可以提供下帮助!谢谢谢!