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

后端 未结 11 1259
北海茫月
北海茫月 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:28

    Apple Updated Doc:

    Each remote notification includes a payload. The payload contains information about how the system should alert the user as well as any custom data you provide. The maximum size allowed for a notification payload depends on which provider API you employ. When using the HTTP/2 provider API, maximum payload size is 4096 bytes. Using the legacy binary interface, maximum payload size is 2048 bytes. Apple Push Notification service (APNs) refuses any notification that exceeds the maximum size.

提交回复
热议问题