iOS8和iOS7推送通知有效负载 [英] iOS8 and iOS7 Push Notification Payload

查看:117
本文介绍了iOS8和iOS7推送通知有效负载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于iOS8提出了交互式通知,是否有任何重大更改使Payload发送推送通知?如果有更改,那么在较低版本的iOS中如何处理它?<​​/ p>

Since iOS8 came up with interactive notification, is there any significant changes to make Payload to send push notification? If changes are there then how it will be handled in lower versions of iOS?

推荐答案

给定的有效载荷存在细微差别。但是,相同的交互式通知有效负载可以推送到iOS7或更低,它将显示为正常通知。

There is a small difference in payloads as given. However same interactive notification payload can be pushed to iOS7 or less, it will be shown as normal notification.


iOS8交互式推送有效负载



{"aps":{"alert":"Hello Testing","badge":1,"sound":"default","category":"your_category_key"}}

your_category_key只是 UIMutableUserNotificationCategory 标识符。

"your_category_key" is nothing but the UIMutableUserNotificationCategory identifier.


旧版本低于iOS8有效载荷



{"aps":{"alert":"Hello Testing","badge":1,"sound":"default"}}

Apple已将有效负载大小扩展到2048字节(2K)。以前只有256字节。

And Apple has extended the payload size up to 2048 Bytes (2K). Previously it was 256 Bytes only.

这篇关于iOS8和iOS7推送通知有效负载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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