1
votes

I'm now working on Apple Push Notification Service and an iPhone application with apns-php.

As everyone using APNS knows there is a limit when using it - we can't send a payload over 256 bytes per message. However, I found a website saying there is another limitation that prohibits from sending a payload in which the network usage exceeds 5000 bytes to 7000 bytes in a connection.

I've been looking for an evidence to this phenomenon or official documents, but found nothing for sure.

Could you please let me know if there is such an undocumented APN restriction in order to send a payload successfully? Did you encounter any other strange experiences while using APN?

The website is right here (Sorry, it's Japanese.)

It says:

  • Don't send a message that exceeds 256 bytes.
  • You will get banned from APNS if you try to send a message with 5000 bytes to 7000 bytes and APNS destroys your session. Then you need to recreate an APN session with a few while sleeping.

Any comments or ideas will be appreciated.

1

1 Answers

0
votes

I've never heard of the 5000-7000 byte limit. On the contrary, Apple encourages you to send multiple messages in a batch for efficiency.

From the APN dev guide :

The binary interface employs a plain TCP socket for binary content that is streaming in nature. For optimum performance, you should batch multiple notifications in a single transmission over the interface, either explicitly or using a TCP/IP Nagle algorithm.

And if you still need an official proof there is not such limit, there's this (taken from here):

Push Notification Throughput and Error Checking

There are no caps or batch size limits for using APNs. The iOS 6.1 press release stated that APNs has sent over 4 trillion push notifications since it was established. It was announced at WWDC 2012 that APNs is sending 7 billion notifications daily.

If you're seeing throughput lower than 9,000 notifications per second, your server might benefit from improved error handling logic.