Apple推送通知折叠关键等效 [英] Apple Push Notification Collapse Key Equivalent

查看:122
本文介绍了Apple推送通知折叠关键等效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Google推送通知时,我可以指定collapse_key值,这样设备就不会收到同一个collapse_key的多个通知。 APNS是否有类似的功能,或者是否有人知道模拟此功能的方法?

When using Google push notifications, I am allowed to specify a collapse_key value so a device will not receive multiple notifications of the same collapse_key. Does APNS have a similar feature or does anyone know a way to emulate this functionality?

推荐答案

iOS中没有这样的功能。但是,由于推送通知是由您控制的服务器发送的,因此您可以跟踪已发送到特定设备的通知,并决定是否发送新通知。换句话说,您将逻辑放在服务器代码中,而不是iOS应用程序代码中。

There is no such feature in iOS. However, since push notifications are sent by a server that is in your control, you can keep track of which notifications you've sent to a particular device, and decide whether or not to send new ones. In other words, you put the logic in your server code, not your iOS app code.

这篇关于Apple推送通知折叠关键等效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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