Reputation: 4948
Hullo, I am sending push notifications by means of this php snippet:
// Build the binary notification
$msg = chr(0) . pack('n', 32) . pack('H*', $deviceToken) . pack('n', strlen($payload)) . $payload;
// Send it to the server
$result = fwrite($fp, $msg, strlen($msg));
it works fine and good with latin languages but, when I try to send a russian notification, nothing arrives, notwithstanding the logs confirm the correct delivery.
notify [email protected] for language ru Saturday 1st of March 2014 08:15:59 PM notify 246e2e720c0f307ef3887922d72b6b6886fa19b44b6dbae7cda8913fe149958e con Ваше активное бронирование было прервана пользователем. dopo***:/var/www/html/php/push/taxi/distribution/ck.pem deviceToken:246e2e720c0f307ef3887922d72b6b6886fa19b44b6dbae7cda8913fe149958eConnected to APNS invio payload{"aps":{"alert":"\u0412\u0430\u0448\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0431\u0440\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0440\u0432\u0430\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.","sound":"default"}}Message successfully delivered I read about issues on the length of the packet, but in both phases it calculates it while sending the message and so it should be the correct length. Any idea about what to do to fix it?
Upvotes: 0
Views: 449
Reputation: 4948
I think the optimal solution is to send english strings and localize them in the app. The only downsize of it is that you need to submit an update each time you want to add a new notification type.
Upvotes: 0