通知中心中的图像预览 [英] Image previews in Notification Center
问题描述
是否可以将图像添加到推送通知的有效负载中?我已经看到它在照片&消息应用。我希望这不是一些私有Apple API。
Is it possible to add an image to a push notification's payload? I've seen it being done in the Photos & Messages apps. I was hoping this wasn't some private Apple API.
下面的屏幕截图是在运行iOS 6的设备上拍摄的。
The screen shot below was taken on a device running iOS 6.
推荐答案
不可能
根据推送通知编程指南,有效负载最大大小不应超过256字节:
According to the Push Notification Programming guide the payload max size should not exceed 256 Bytes:
文档摘录:
有效载荷长度 - 网络中有效载荷的长度订单(即
big endian)。有效负载不得超过256个字节,且不得为
以空值终止。
Payload length—The length of the payload in network order (that is, big endian). The payload must not exceed 256 bytes and must not be null-terminated.
以下是Apple文档链接:
Here´s the Apple Documentation link :
这篇关于通知中心中的图像预览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!