是否APNS反馈服务不再存在按照新的API? [英] Does APNS Feedback service no longer exist as per new APIs?

查看:1350
本文介绍了是否APNS反馈服务不再存在按照新的API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在经历更新<一个href=\"https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Appendixes/BinaryProviderAPI.html#//apple_ref/doc/uid/TP40008194-CH106-SW4\"相对=nofollow>官方APNS文档上面清清楚楚地写着,

I was going through updated official APNS documentation and it clearly says,

所有的开发应在其远程通知供应商的服务器迁移到的APN提供API所描述的功能更强大,更高效的基于HTTP的2 / API。

All developers should migrate their remote notification provider servers to the more capable and more efficient HTTP/2-based API described in APNs Provider API.

但新的APN提供API似乎并不具有旧APNS反馈服务。他们已经改变它没有反馈服务端点端点的URL。还要在错误$ C $现在CS升级,其中包括下面的错误code,

But the new APNs Provider API doesn't seem to have old APNS Feedback Service. They have changed endpoint URLs which doesn't have feedback service endpoint. Also looks the error codes are upgraded now, which includes below error code,

未注册 -
  该设备令牌无效指定的话题。

Unregistered - The device token is inactive for the specified topic.

所以,我们是不是猜想再调用APNS反馈服务?

So aren't we suppose to call the APNS Feedback service anymore?

我的主要问题是,我使用javapns API 2.2版本适用于iOS推动这我不能找到任何更新,这将帮助我这个新的变化,以应付了通知。

My major problem is I'm using javapns api version 2.2 for iOS push notifications for which I'm not able to find any update which will help me to cope up with this new changes.

推荐答案

我觉得新的文档是明确的:

I think the new doc is clear :

有是一个HTTP状态code因为这是由反馈服务pviously报$ P $的情况:

There's an HTTP status code for the case that was previously reported by the Feedback Service :

410 - 该设备令牌不再活跃的话题

410 - The device token is no longer active for the topic.

此外,还有一个名为JSON数据键时间戳在响应正文:

In addition, there's a JSON data key named timestamp in the response body :

时间戳

如果在值:状态标头是410,这个键的值是最后一次在此的APN证实,该设备令牌不再有效的话题

If the value in the :status header is 410, the value of this key is the last time at which APNs confirmed that the device token was no longer valid for the topic.

停止推通知,直到设备注册与您的供应商以后的时间戳的令牌。

Stop pushing notifications until the device registers a token with a later timestamp with your provider.

因此​​,新的API在HTTP响应覆盖,这是$ P $由反馈服务pviously覆盖的功能。由于反馈服务没有在新文档提到的,我们可以有把握地认为这不是新的API的一部分。

Therefore, the HTTP response in the new API covers the functionality that was previously covered by the Feedback Service. Since the Feedback Service is not mentioned in the new doc, we can safely assume that it's not part of the new API.

如果您使用的是旧的库如的 javapns 的,它仍然使用旧的API,我假设它仍然使用反馈服务了。旧的API可能仍然由苹果一段时间的支持。

If you are using an old library such as javapns, which still uses the old API, I'm assuming that it still uses the Feedback Service too. The old API is likely to still be supported by Apple for a while.

这篇关于是否APNS反馈服务不再存在按照新的API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆