含义不同的状态codeS里APNS错误响应包 [英] Meaning Of Different Status Codes In APNS Error Response Packets

查看:343
本文介绍了含义不同的状态codeS里APNS错误响应包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

APNS使用增强的通知格式时,返回下面的状态codeS错误应答报文。

APNS returns the following status codes in error response packets when using the enhanced notification format.


0   - No errors encountered
1   - Processing error
2   - Missing device token
3   - Missing topic
4   - Missing payload
5   - Invalid token size
6   - Invalid topic size
7   - Invalid payload size
8   - Invalid token
255 - None (unknown)

我想知道这些状态codeS的实际表示,这个问题实际上是与设备令牌(即:我可以标记在我的数据库为无效或不活动的特定设备令牌)。我相信,我可以放心地做,当我收到的状态code值8。另外,我pretty肯定什么样的地位$ C $ 2 CS,4,5和7,并指出正是当他们回来了。

I want to know which of these status codes actually indicate that the issue is actually with the device token (ie: I can mark that particular device token in my database as invalid or inactive). I am sure that I can safely do that when I receive a value of 8 as status code. Also, I am pretty sure about what status codes 2, 4, 5 and 7 indicate and when exactly are they returned.

但对于状态codeS的休息,我是pretty多在黑暗中。苹果公司的网站不包含有关他们的信息量无论是。

But for the rest of the status codes, I am pretty much in the dark. Apple's website does not contain much information about them either.

任何人都可以请赐教关于各状态codeS里的细节。提前很多感谢。

Can anybody please enlighten me about each of these status codes in detail. Many thanks in advance.

推荐答案

您说得对2,4,5,7,和8。
0显然是个好消息。
我们留下了:

You're right about the 2, 4, 5, 7, and 8. 0 is good news obviously. We're left with:

1   - Processing error
3   - Missing topic
6   - Invalid topic size
10  - Shutdown
255 - None (unknown)

1是苹果的一侧的问题,不相关的令牌。

1 is a problem on Apple's side, not related to the token.

3,根据<一href=\"https://developer.apple.com/library/IOs/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW4\"相对=nofollow>苹果:

The topic is currently the bundle identifier of the target application on an iOS device.

6涉及3

10是失控的,但良好的处理为好。

10 is out of your control but good to handle as well.

很显然,255将不能够帮助您确定如果令牌是这个问题。

And obviously, 255 will not be able to help you define if the token is the problem.

如果你的目标是确定一个令牌是在某些时候有效,不再是,你真的应该参照<一个href=\"https://developer.apple.com/library/IOs/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW3\"相对=nofollow>反馈服务API 。

If your goal is to determine a token that was valid at some point and no longer is, you should really refer to the Feedback Service API.

这篇关于含义不同的状态codeS里APNS错误响应包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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