Take the 2-minute tour ×

What is the maximum length of the alert text of an iOS push notification?

The documentation states that the notification payload has to be under 256 bytes in total, but surely there must be a specific character limit for the alert text.

share|improve this question
add comment

3 Answers

up vote 53 down vote accepted

Sadly, the real limits are not documented anywhere. The only thing the documentation says is:

The maximum size allowed for a notification payload is 256 bytes;

But that only applies to the simple notification format, it doesn't say anything about the new enhanced notification format.

A MALCOM team member did some experiments and this is what he found:

  • UIAlertView display limit is 107 characters. After that your message gets truncated and you will get a "..." at the end of the displayed message.
  • We were able to send (and receive) messages as a long as 1400 characters.
  • Big/long messages (> 200 chars) take longer to get to the destination. We still need to check if this is due to the enhanced notification format or not.
share|improve this answer
Should be clarified that an in-app UIAlertView has no display limit; text over a certain length will go into a scroll view. An SMS or push alert probably has that 107-character limit, however. –  azdev Aug 5 '11 at 18:34
And displayed text is not limited by payload, because when you use localization method it's no longer match 1:1. Payload may be short while final message may be much longer. The question is about displaying message it's not strictly related to payload maximum length. –  Marcin Feb 17 at 11:54
add comment

It should be 236 bytes. There is no restriction on the size of the alert text as far as I know, but only the total payload size. So considering if the payload is minimal and only contains the alert information, it should look like:


That takes up 20 characters (20 bytes), leaving 236 bytes to put inside the alert string. With ASCII that will be 236 characters, and could be lesser with UTF8 and UTF16.

share|improve this answer
ASCII encoding violates the JSON spec, which requires UTF-8, UTF-16LE, UTF-16BE, UTF-32LE, or UTF-32BE. See ietf.org/rfc/rfc4627.txt; page 4. –  Aaron Brager Nov 15 '13 at 20:04
ASCII is a subset of UTF-8, so it is always safe to transmit 8-bit ASCII over the wire. –  Patrick Horn Dec 11 '13 at 3:35
add comment

The limit of the enhanced format notifications is documented here.

It explicitly states:

The payload must not exceed 256 bytes and must not be null-terminated.

ascandroli claims above that they were able to send messages with 1400 characters. My own testing with the new notification format showed that a message just 1 byte over the 256 byte limit was rejected. Given that the docs are very explicit on this point I suggest it is safer to use 256 regardless of what you may be able to achieve experimentally as there is no guarantee Apple won't change it to 256 in the future.

As for the alert text itself, if you can fit it in the 256 total payload size then it will be displayed by iOS. They truncate the message that shows up on the status bar, but if you open the notification center, the entire message is there. It even renders newline characters \n.

share|improve this answer
add comment

Your Answer


