Multiple iPhone APN messages, single connection

后端 未结 1 1730
梦如初夏
梦如初夏 2021-01-01 00:31

I have a strange issue. I\'m trying to get Apple Push Notifications working with Python. I can connect and send individual messages without a problem. The issues pop up when

相关标签:
1条回答
  • 2021-01-01 00:59

    Apple will silently drop your connection if it receives an invalid device token or a message that's too long. The next couple of messages after that will fail because they're just sent into the ether, essentially - the connection is closed, but the TCP window isn't exhausted.

    At Urban Airship, where I work, we have a debug mode to use when people test their applications with push on our service. This will pause for a little bit after sending a message to ensure that this wasn't the issue - if the connection drops, we know it's an issue with the device token and report an error as such. A similar method might be a good way for you to check that this is, or is not, what's going on. Obviously this kills throughput and so we don't recommend it for a production environment.

    0 讨论(0)
提交回复
热议问题