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

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

问题描述

自从 iOS8 推出交互式通知后,是否有任何重大变化让 Payload 发送推送通知?如果有变化,那么在较低版本的iOS中将如何处理?

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 Payload 的旧版本

{"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天全站免登陆