I am integrating a Push Provider Server with the codes (php-apns) from google codes. Everything seems to be fine except the number of bytes per message.
The number of bytes per payload should be maximum 256 characters.
If some Chinse characters or UTF8 characters are sent. After JSON_enode, each character would occupy 6 bytes. Am I right ?
So the maximum number of UTF8 characters in each push message is around 38.
But … Whatsapp (iPhone application) uses PUSH too, but it can push more Chinese characters … in one push message ?
Any hint ?
Here is the solution to your problem:
go to ~/APNS/Message.php
and replace this function:
with this:
Tada!
now you will be able to receive long utf-8 message without problems.
source