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?
由于iOS8提出了交互式通知,是否有任何重大的更改可以使有效负载发送推送通知?如果有变化,那么如何在较低版本的iOS中进行处理?
1 个解决方案
#1
5
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.
在有效载荷上有一个小的区别。但是,同样的交互式通知有效负载可以被推到iOS7或更少,它将显示为正常通知。
iOS8 Interactive Push Payload
iOS8互动推动负载
{"aps":{"alert":"Hello Testing","badge":1,"sound":"default","category":"your_category_key"}}
"your_category_key" is nothing but the UIMutableUserNotificationCategory identifier.
“your_category_key”不过是UIMutableUserNotificationCategory标识符。
Older Version less than iOS8 Payload
老版本小于iOS8有效负载。
{"aps":{"alert":"Hello Testing","badge":1,"sound":"default"}}
And Apple has extended the payload size up to 2048 Bytes (2K). Previously it was 256 Bytes only.
苹果公司将有效载荷扩展到2048字节(2K)。以前只有256字节。
#1
5
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.
在有效载荷上有一个小的区别。但是,同样的交互式通知有效负载可以被推到iOS7或更少,它将显示为正常通知。
iOS8 Interactive Push Payload
iOS8互动推动负载
{"aps":{"alert":"Hello Testing","badge":1,"sound":"default","category":"your_category_key"}}
"your_category_key" is nothing but the UIMutableUserNotificationCategory identifier.
“your_category_key”不过是UIMutableUserNotificationCategory标识符。
Older Version less than iOS8 Payload
老版本小于iOS8有效负载。
{"aps":{"alert":"Hello Testing","badge":1,"sound":"default"}}
And Apple has extended the payload size up to 2048 Bytes (2K). Previously it was 256 Bytes only.
苹果公司将有效载荷扩展到2048字节(2K)。以前只有256字节。