处理APNS远程通知,而在后台 [英] Handle APNS Remote Notifications while in Background

查看:115
本文介绍了处理APNS远程通知,而在后台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现在所有的AppDelegate推荐的方法来获得工作的远程通知服务。

I have implemented all recommended methods in AppDelegate to get working Remote Notifications service.

在运行,同时发动和同时关闭我可以接受他们。

I can accept them while running, while launching and while turned off.

但有一个问题,因为而在后台,我不能多收到的通知工作。我可以用最新的通知才有效。

But there is an issue, since I can't work with many received notifications while in background. I can work only with latest notification.

什么建议手动做到这一点?我怎样才能得到所有收到的通知,而在后台?难道只有通过手动调用解我的服务提供商(APNS数据的发送方)?

What is recommended manual to do that? How can I got all notifications received while in background? Is it only solvable via manual call to my service provider (sender of apns data)?

推荐答案

对于所有我在那里一直没有办法合作,如果推通知被驳回本地存储这些信息的项目。在所有这些情况下,我们所使用的服务器上的一个小文件,应用程序会连接到拉,当它再次变得活跃起来。还有在应用中的一些地方,用户可以看到所有的通知,这又被存储在服务器进行快速检索的。

With all the projects I've worked on there hasn't been a way to locally store this information if the push notification is dismissed. In all those cases we used a small file on the server that the app would connect to and pull when it became active again. There was also some place in the app where the user could see all their notifications which, again, were stored on the server for quick retrieval.

使用我理解推送通知要设置,如果通知被驳回系统将放弃它的方式。它会执行什么它应该做的(如更新证件号码并播放正确的声音),特定于该通知被丢失,但任何其他信息。

With the way I understand push notifications to be setup, if the notification is dismissed the system discards it. It'll perform anything it's supposed to do (such as update the badge number and play the correct sound) but any additional information specific to that notification is lost.

这篇关于处理APNS远程通知,而在后台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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