I'm brand new to IOS push notifications. I have been reading about them and can't seem to find this information anywhere. I have read that the size limit on a push notification is 256 Bytes. Does this size limit include things such as the device token that have to be sent and other overhead information about the notification. If so what is the actual size I have avaliable for my content.
Also what format are they using to interpret the text that I send? Is the conversion 1 character = 1 byte or is it more than that. Really I want to know how many characters can I send in a push notifications.
Thanks for any help in understanding the limitations of push notification payloads.
What Are App Push Notification Character Limits? For iOS devices, the character limit is 178 before the text is cut off. This means four lines of text. On Android, the character limits are 65 characters for titles and 240 for descriptions.
Push notifications have word boundations. Meaning, their title cannot exceed a character limit of about 48 characters; copy content limits to 100 characters; and a call-to-action button.
A basic notification includes a title, some text, an icon, and a link. A title can contain up to 65 characters, a description is generally limited to 240 characters.
Each push notification carries with it a payload. The payload specifies how users are to be alerted to the data waiting to be downloaded to the client application. The maximum size allowed for a notification payload is 256 bytes; Apple Push Notification Service refuses any notification that exceeds this limit.
For each notification, providers must compose a JSON dictionary object that strictly adheres to RFC 4627. This dictionary must contain another dictionary identified by the key aps. The aps dictionary contains one or more properties that specify the following actions:
- An alert message to display to the user
- A number to badge the application icon with
- A sound to play
- Local and Push Notifications Programming Guide
So, answering your question,
Does this size limit include things such as the device token that have to be sent and other overhead information about the notification.
Yes, this size limit includes device token and other overhead information.
Is the conversion 1 character = 1 byte or is it more than that.
This is true if you're using only Latin letters in your notification.
The above is all fairly unclear, because 'include' can mean "it is already included" or "you must include it". To be very clear, the device ID is 'metadata', not part of the payload, and does not come out of your 256 character budget. The other APS overhead (standard payload dictionary), though, is.
Source: the above documentation plus experimentation to verify.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With