如果第 (n-1) 个令牌错误,则不发送第 n 个 Apple 推送通知 [英] n-th Apple push notification not sent if (n-1)-th has wrong token

查看:21
本文介绍了如果第 (n-1) 个令牌错误,则不发送第 n 个 Apple 推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用简单格式的 apn 时遇到了一些问题.这是场景:

I am having some problems with apn, using simple format. This is the scenario:

1) 我有一个到 apn 推送服务的持久连接.

1) I have a persistent connection to apn push service.

2) 我连续发送 10 条消息,例如第 5 条可能有错误的设备令牌

2) I send in a row 10 messages, where for example the 5th can have wrong device token

3) 从 1 到 4 的所有消息都正确发送

3) All messages from 1 to 4 are sent correctly

4) 我从所有消息(包括第 5 到第 10 条)成功发送的套接字中收到一条消息.

4) I receive a message from the socket of successful sending for all messages (included the ones from 5th to 10th).

5) 从 6 号到 10 号的消息不会推送给用户.

5) message from 6th to 10th are not pushed to users.

6) 一段时间后连接被 apn 服务器关闭

6) after a while connection is closed by apn server

我做错了什么还是这是常见的行为?

am i doing something wrong or is this the common behavior?

推荐答案

你用什么来发送推送通知?你能分享你的代码吗?我一直在使用 APNS-Sharp 很久以来,它一直工作得非常好.如果第 5 条消息有坏标记,则完全独立于下一条消息!确保您定期运行反馈服务​​并删除无效令牌和令牌不想接受您的推送通知.另请查看 PushSharp.

What are you using to send push notification? Can you share your code? I have been using APNS-Sharp since long and it has been working absolutely fine. If 5th message has bad token is totally independent of next message! Make sure that you run Feedback service regularly and remove invalid tokens and the tokens doesn't want to accept your push notification. Also have a look at PushSharp.

这篇关于如果第 (n-1) 个令牌错误,则不发送第 n 个 Apple 推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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