简体   繁体   English

当APNS令牌失败时,是否必须重复其余的推送通知?

[英]When APNS tokens fail, is it a must to repeat the remaining push notifications?

I'm sending 1-10 notifications at a time, sometimes one of the tokens fail, I'm guessing they fail when a user deletes the app (or other similar reasons), do I need to retry the remaining tokens/notifications for that batch? 我一次发送1-10条通知,有时其中一个令牌失败,我猜测当用户删除应用程序(或其他类似原因)时,令牌失败,我是否需要重试其余的令牌/通知批量? (I receive a "failed token" warning later on from PyAPNS) (稍后我从PyAPNS收到“令牌失败”警告)

The tokens are all valid tokens, it's stated that malformed tokens require a retry of the remaining push notifications, however I'm wondering whether I need to retry too with non-malformed tokens, it would be pretty stupid If I need to retry in the above scenario, people delete apps all the time, I'm guessing a high percentage of batches would require a retry 令牌都是有效令牌,据说格式错误的令牌要求重试其余的推送通知,但是我想知道是否也需要对格式错误的令牌重试,如果我需要在在上述情况下,人们一直在删除应用程序,我猜很多批次的批处理都需要重试

(There are many questions related to this issue, however I wasn't able to find a definite answer, from my trials I'm guessing I already have my answer, It seems the notifications aren't delivered in the above scenario) (与此问题相关的问题很多,但是我无法从我的试验中找到确切的答案,我想我已经有了答案,在上述情况下似乎未发送通知)

I don't know what causes PyAPNS to return a "failed token" warning. 我不知道是什么原因导致PyAPNS返回“失败的令牌”警告。 If it refers to a token belonging to a device that uninstalled the app (which I doubt, since such device tokens are only returned by the Feedback Service), you don't have to re-send the remaining notifications. 如果它引用的是属于已卸载应用程序的设备的令牌(我怀疑,因为此类设备令牌仅由反馈服务返回),则不必重新发送其余的通知。

However, if this failure is caused by an error response of InvalidToken, this means the connection to APNS was closed after the invalid token was processed, and any notifications that were sent after it must be re-sent. 但是,如果此故障是由InvalidToken的错误响应引起的,则意味着在处理了无效令牌后,将关闭与APNS的连接,并且必须重新发送在此之后发送的所有通知。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM