APN(苹果推送通知)有效载荷大小限制 [英] APN (Apple Push Notification) payload size limit

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

问题描述

在<一个href=\"https://developer.apple.com/library/IOs/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html\">official文档你可以找到的信息:

每个推送通知,包括有效载荷。该有效载荷包含
  关于系统应如何提醒用户以及任何信息
  自定义数据您提供的。允许的通知的最大尺寸
  有效载荷的 256字节;苹果推送通知服务拒绝任何
  通知,超过此限制。

Each push 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 is 256 bytes; Apple Push Notification Service refuses any notification that exceeds this limit.

然而,在WWDC 14,我们可以看到这个截图:

However in WWDC 14 we can see this screenshot:

我不知道是否有关于推送通知的大小限制任何官方声明的苹果。我测试了它和较大的256个字节的作品,但文件说,它不应该。有人可以证实或否认远程通知的大小?

I wonder if there is any official Apple statement about the size limit of push notification. I tested it and larger that 256 bytes works, but documentation said it shouldn't. Can someone confirm or deny the size of remote notifications?

推荐答案

苹果已经更新的文档。为最大有效负载尺寸的2KB只供运行iOS 8. <一个设备href=\"https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html\">official DOC 说:

Apple has already updated the documentation. The 2KB for the maximum payload size is just for devices running iOS 8. The official doc says:

在iOS的8和更高版本,最大尺寸允许的通知
  有效载荷为2千字节;苹果推送通知服务拒绝任何
  通知,超过此限制。 (在此之前到iOS 8和OS X中,
  最大有效载荷大小为256字节)。

In iOS 8 and later, the maximum size allowed for a notification payload is 2 kilobytes; Apple Push Notification service refuses any notification that exceeds this limit. (Prior to iOS 8 and in OS X, the maximum payload size is 256 bytes.)

这篇关于APN(苹果推送通知)有效载荷大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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