What is the maximum length of a Push Notification alert text?

后端 未结 11 1254
北海茫月
北海茫月 2020-11-30 16:28

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,

11条回答
  •  無奈伤痛
    2020-11-30 17:09

    For regular remote notifications, the maximum size is 4KB (4096 bytes) https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html

    ###iOS the size limit is 256 bytes, but since the introduction of iOS 8 has changed to 2kb!

    https://forums.aws.amazon.com/ann.jspa?annID=2626

    With iOS 8, Apple introduced new features that enable some rich new use cases for mobile push notifications — interactive push notifications, third party widgets, and larger (2 KB) payloads. Today, we are pleased to announce support for the new mobile push capabilities announced with iOS 8. We are publishing a new iOS 8 Sample App that demonstrates how these new features can be implemented with SNS, and have also implemented support for larger 2KB payloads.

提交回复
热议问题