Posts Tagged ‘forbidden words’
I recently discovered, that push notifications containing the word “(null)” (without the quotes) do not get pushed. They don’t break your APNS connection, simply never reach the recipient’s device.
Most likely, Apple wants to avoid some injection and I’m pretty sure, there are more words out there, that will not push.
In PHP, you can take simple precautions, to work around this:
$message = "(null) bla bla bla bla bla"; //this is our message
$messageFiltered = str_replace("(null)", "", $message);
I discovered this, when trying to push an iCal calendar event. Sometimes, iCal does not add the sender’s name, but (null) instead.
Hope, this is helpful to someone out there.
In case, you know more “forbidden words”, please leave a comment.
