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

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

问题描述

我正在更新 官方 APNS 文档 它清楚地说,

所有开发人员都应该将他们的远程通知提供程序服务器迁移到 APNs 提供程序 API 中描述的更强大、更高效的基于 HTTP/2 的 API.

但是新的 APNs Provider API 似乎没有旧的 APNS 反馈服务.他们更改了没有反馈服务端点的端点 URL.看起来错误代码现在也升级了,包括下面的错误代码,

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.

推荐答案

我认为新文档很清楚:

反馈服务先前报告的案例有一个 HTTP 状态代码:

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.

此外,响应正文中有一个名为 timestamp 的 JSON 数据键:

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

时间戳

如果:status 标头中的值为 410,则该键的值是 APNs 确认设备令牌不再对主题有效的最后时间.

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 响应涵盖了之前由反馈服务涵盖的功能.由于新文档中没有提到反馈服务,我们可以放心地假设它不是新 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,我假设它也仍然使用反馈服务.Apple 可能仍会支持旧 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.

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

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