n-th Apple push notification not sent if (n-1)-th

2019-08-24 10:28发布

问题:

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

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

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

3) All messages from 1 to 4 are sent correctly

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

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

6) after a while connection is closed by apn server

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

回答1:

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.