javapns-jdk16 icon indicating copy to clipboard operation
javapns-jdk16 copied to clipboard

Increase limit for Apple message payload to 4K

Open gpiancastelli opened this issue 9 years ago • 1 comments

Hello,

with the introduction of iOS 9 the payload size for push messages has been increased to 4K. According to the official Apple documentation: "The body content of your message is the JSON dictionary object containing the notification data. The body data must not be compressed and its maximum size is 4KB (4096 bytes)."

I understand that the current payload limit supported by this library is 2K (from version 2.3). Is there any chance for this limit to be uplifted to 4K any time soon?

gpiancastelli avatar Aug 23 '16 16:08 gpiancastelli

Hello, thanks for the suggestion. I read the documentation and the 4k limit can only be used with a new API provided from Apple.

When using the HTTP/2 provider API, maximum payload size is 4096 bytes. Using the legacy binary interface, maximum payload size is 2048 bytes.

So this library will have to first migrate to the new API, and then add support for that. I'm not sure how difficult is this (I didn't analyze all the changes to this library or even if I should create a new one), so I cannot tell you if this is going to be supported soon.

fernandospr avatar Aug 24 '16 15:08 fernandospr