我可以与苹果的推送通知服务发送图像? [英] Can I send an image with Apple's Push Notification Service?

查看:172
本文介绍了我可以与苹果的推送通知服务发送图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要显示每当我的应用程序接收通知的图像。

I need to show an image whenever my application receive Notification.

请问苹果推送通知支持的图片发送

Does Apple push notification support image sending?

更新

如果上面的事情是不可能的,我们可以展示URL图像 UIAlertView中当我们收到通知。

If above thing is not possible can we show image from url on UIAlertview when we receive notification.

推荐答案

没有。该通知的有效载荷可高达256个字节长。只有当EN codeD图像尺寸加上有效负载的其余部分不超过这更大您可以发送图像......没用的。

No. The notification payload can be up to 256 bytes long. You can send an image only if the encoded image size plus the rest of the payload is no more bigger than that... useless.

您可以,但是,使用推出-图片警告 APN字典属性指定由应用程序捆绑的图像,将在应用程序启动使用。

You can, however, use launch-image property from alert apn dictionary to specify an image from app bundle that will be used at app launch.

或者,您可以发送从该图像能够在该应用内下载的URL。

Or you can send a URL from which the image can be downloaded within the app.

请看看<一个href=\"https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW1\">Apple文档

这篇关于我可以与苹果的推送通知服务发送图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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