iPhone推送通知字符限制 [英] iPhone Push Notification Character Limit

查看:151
本文介绍了iPhone推送通知字符限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是IOS推送通知的新手。我一直在阅读它们,似乎无法在任何地方找到这些信息。我已经读过推送通知的大小限制是256字节。此大小限制是否包括必须发送的设备令牌以及有关通知的其他开销信息。如果是这样,我的内容可用的实际大小是多少。

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.

他们用什么格式来解释我发送的文字?转换1字符= 1字节还是更多。我真的想知道我可以在推送通知中发送多少个字符。

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.

推荐答案


每个推送通知都带有一个有效负载。有效负载
指定如何向等待下载到客户端应用程序的
的数据发出警报。
通知有效负载允许的最大大小为256字节; Apple推送通知服务
拒绝任何超出此限制的通知。

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.

对于每个通知,提供商必须撰写严格遵守的JSON字典对象
RFC 4627.此字典必须包含
由密钥aps标识的另一个字典。 aps字典
包含一个或多个指定以下操作的属性:

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

-
本地和推送通知编程指南

所以,回答你的问题问题,

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.


转换1字符是否为1 b是或者不止于此。

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.

这篇关于iPhone推送通知字符限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆